I have an old project, which now requires new functions, I'm going to use laravel to provide it, everything works fine in xampp with apache, but my con nginx server shows me a message about access denied and can not access my routes, as there must be my site configurator, if laravel is installed in mysite.com/2015, my site configuration is as follows, what showld am I changing? I tried
location /newsection/ {
try_files $uri $uri/ /newsection/public/index.php$request_uri;
}
but causes 500 errors
server {
listen 80;
server_name am2.aminversiones.com;
root /home/forge/am2.aminversiones.com;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
index index.html index.htm index.php;
charset utf-8;
client_max_body_size 300M;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/am2.aminversiones.com-error.log error;
error_page 404 /index.php;
location ~ \.php$ {
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;
}
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
location ^~ /2015 {
alias /home/forge/am2.aminversiones.com/2015/public;
try_files $uri $uri/ @2015;
location ~* \.php {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
}
}
location @2015 {
rewrite ^/2015/(.*)$ /2015/index.php/$1 last;
}
location ~ /2015 {
try_files /2015/$uri /2015/$uri/ /2015/index.php?q=$uri&$args;
}
location ~* \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
source
share