I want to create two Laravels websites on my REMOTE local NGINX server.
I think it’s important to note remote because major examples we can find on the internet
are made on a local server installed directly on the working computer.
The IP address of the server is 10.150.6.84. It’s an internal address for my company.
I need to use putty to connect to the server.
My first Laravel website is demo1.dev
My second Laravel website is demo2.dev
I want to call my websites like this on URL:
http://10.150.6.84/demo1.dev and http://10.150.6.84/demo2.dev
My goal is that the programmer can work and call http://10.150.6.84/demo1.dev
to verify his work. In short, a website demo.# for each programmer.
I have sites-available on my NGINX server.
I tried to create a demo1.conf, demo2.conf, but it calls only demo1.
I tried to use the alias but it did not work.
I have forbidden 403 or 404 not found.
I simplified the code for better visibility.
server {
listen 80;
listen [::]:80;
server_name development;
root /var/www/html;
index index.php;
location /demo1.dev/ {
alias /var/www/html/demo1.dev/public;
}
location /demo2.dev/ {
alias /var/www/html/demo2.dev/public;
}
}
Thank you for your help