1 year ago

multiple laravel site on one vps

Posted 1 year ago by jahstation

I need to host more than one laravel site on the same virtual machine that is on a server of ovh.

No domain bought on it, the name is defined on /etc/hosts as

xx.xx.xx.xx vpsname.net vpsName where xx is a number of the ip address;

I take this project it from another man that go away and i can talk with him,anyway is configuration is:

/var/www/html/site1 (apache under ubuntu server 18)

If u try to access to ip or vpsName the index of the site1 is showed to the user.

inside the laravel's public folder I found the .htaccess with this on it:

Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ / [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}]

Wich one is the best way to move to a configuration like:

urlvps.com/site1 urlvps.com/site2 urlvps.com/siteN wich files needs to be modded?

I take a look over: /etc/apache2 but i cannot see any mods in effect!


Please sign in or create an account to participate in this conversation.