4
Good morning guys, I’m cracking my head here.
I have a server with Nginx and in it I have two applications:
1 - Laravel App /usr/share/Nginx/html/Laravel/public
2 - Joomla app /usr/share/Nginx/html/joomla
The application in Laravel is the main one that must be accessed in 'http://domain.com.br/' and joomla must be accessed at 'http://domain.com.br/former'.
Below follows the default configuration code:
server {
listen 80;
listen [::]:80 ipv6only=on;
root /usr/share/nginx/html/laravel/public;
index index.php index.html index.htm default.html default.htm;
server_name 104.131.92.76;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ /antigo/ {
root /usr/share/nginx/html/joomla;
index index.php index.html index.htm default.html default.htm;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
What am I doing wrong?
Tries to change
try_files $uri $uri/ /index.php?$args;
fortry_files $uri $uri/ /antigo/index.php?$args;
.– Bruno Wego
Do a test on terminal runs
nginx -t
if you have error your conf. will show you which line is wrong.– Wender