I have domain www.mysite.com
I would like to host multiple systems in this domain. Staying like this:
www.mysite.com/system1
www.mysite.com/system2
www.mysite.com/system3
I use virtualhost like this:
<VirtualHost *:80>
ServerName meusite.com.br
ServerAlias www.meusite.com.br
ServerAdmin [email protected]
DocumentRoot "/var/www"
Alias /sistema1 "/var/www/sistema1/public"
<Directory "/var/www/sistema1/public">
AllowOverride All
Options Indexes FollowSymLinks MultiViews
Order deny,allow
Allow from all
</Directory>
Alias /sistema2 "/var/www/sistema2/public"
<Directory "/var/www/sistema2/public">
AllowOverride All
Options Indexes FollowSymLinks MultiViews
Order deny,allow
Allow from all
</Directory>
I change the .htaccess of each of the projects to this:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
Options +FollowSymLinks
RewriteEngine On
**RewriteBase /sistema1**
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
The system is all in laravel. It's working that way up, though, I guess that's not the right approach. In another project we are using, it is displaying errors in the ajax url's. I am a student and need to configure this university server to host other systems in that domain.
Could you tell me which approach to use or what should I start studying? I do not know much, I need a direction.