I've got a php application which I use to place in:
~/public_html/beta/
And mantis and phpmyadmin in:
~/public_html/mantis/
~/public_html/phpmyadmin/
The application used to be accessed as:
www.mysite.com/beta/
And the others as:
www.mysite.com/mantis
www.mysite.com/phpmyadmin
We've had to make certain changes in our application and need to shift the application from /beta/ to / (ie the document root).
I'm not comfortable with having mantis, phpmyadmin as subfolders in public_html - I'm afraid they may be accidentally deleted / tampered by me / other admins.
How can I setup my httpd.conf so that I can continue accessing my mantis and phpmyadmin as:
www.mysite.com/mantis
www.mysite.com/phpmyadmin
as well as keep the "application" at:
www.mysite.com
?
My current httpd.conf reads as:
<VirtualHost IPADDRESS:80>
ServerAlias MYSITE.com
DocumentRoot /var/www/html
ServerName MYSITE.com
UseCanonicalName On
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
...
Do you need to keep them in folders under the main domain, or can you put them on subdomains?
You can keep the application, mantis and phpmyadmin in separate folders, set up 3 virtual domains for each of them, eg:
So application straight into public_html, phpmyadmin into /var/www/html/phpmyadmin, and mantis into /var/www/html/mantis.
Then just set up the additional DNS and access the sites with: www.mysite.com phpmyadmin.mysite.com mantis.mysite.com
You should be able to do a rewrite rule in .htaccess, something like RewriteEngine on
(That will redirect every request to the /beta/ subfolder unless it starts in ether mantis or phpmyadmin, also it was done from memory so if you get a syntax error it's just my ineptness at regular expressions)