Koozali.org: home of the SME Server

install PHP app

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
install PHP app
« on: December 20, 2004, 04:27:40 PM »
I have a PHP app I would like to load in a secure directory, say, usr/local/myapp, and have the log in page of the app in my Primary web site tree. For example, www.mydomain.com/logOnMyApp.php.

How do I set this up?
- Mark

Offline dmac

  • ****
  • 143
  • +0/-0
    • http://www.rylar.ca
install PHP app
« Reply #1 on: December 21, 2004, 08:31:54 PM »
You could use the include option with your LogOnMyApp.php file.  This would require that you adjust the php.ini file to point to the directory where you script would be located.  (Suggest searching for information on how to create / update templates   8-) )

Why not just set up an IBay and secure the IBay with your scripts located there?  You could then create an alias within Apache (eg login.mydomain.com) that would point to your IBay.

Darin
"In a world without Fences, why do we need Gates and Windows"

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
apache alias [was: install PHP app]
« Reply #2 on: January 07, 2005, 05:39:04 PM »
Quote
You could then create an alias within Apache (eg login.mydomain.com) that would point to your IBay.


Darin, thank you for the suggestion. This makes perfect sense.

I have searched around to learn how to create an alias, e.g. login.mydomain.com, but have not read anything that makes sense to me. I have some experience with SME and Linux but little to nothing with Apache mods.

Can you suggest a link to a concise explanation of how to set an alias?

TIA,
- Mark

Offline dmac

  • ****
  • 143
  • +0/-0
    • http://www.rylar.ca
install PHP app
« Reply #3 on: January 09, 2005, 07:37:51 AM »
Mophilly,

Follow this link to read about how the template system works with SME Server.
http://no.longer.valid/phpwiki/index.php/Customizing

In your case you will be creating a directory structure
/etc/e-smith/templates-custom/etc/httpd/conf/http.conf

What I did was in this directory created a text file called 81MailVirtualHost with the following information:
<virtualHost 0.0.0.0:80>
 ServerName alias.your.domain
 ServerAlias  alias  FQDNServername.your.domain
 DocumentRoot home/e-smith/files/ibays/YourIBAYname/html
 ScriptAlias  /cgi-bin  /home/e-smith/files/ibays/YourIBAYname/cgi-bin
  Alias  /files  home/e-smith/files/ibays/YourIBAYname/files

</VirtualHost>

So all the bolded areas you will need to supply the appropriate information.  The alias portions will be your login name.
You can use :443 instead of :80 if you only want to use HTTPS.
Then run the command /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf.  This should rebuild your http.conf file.

I have create an alias using this format for my SquirrelMail Ibay called mail.  So when I access mail.domain.com I am forwarded to the SquirrelMail login screen.

HTH

Darin

Almost forgot, you will need to update your DNS records with the alias.domain.com with your ISP or DDNS supplier other wise the alias wont resolve from the internet.  You will also need to add an Alias in your own DNS if you have a DNS server.
"In a world without Fences, why do we need Gates and Windows"