how to migrate ojs from apache to nginx. I have configured “disable_path_info = On” but only the start page. The form register page and the other are blank.
i’m using Virtual Hosts, this my configuration
server {
listen 80;
listen [::]:80;
root /var/www/ojs/html;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
index index.php index.html index.htm index.nginx-debian.html;
server_name ojs;
location / {
# try_files $uri $uri/ =404;
#autoindex on;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_pass unix:/run/php/php5.6-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location ~ ^/cache(.*)$ {
deny all;
}
location ~ ^/index.php($|/) {
fastcgi_split_path_info ^(.*?\.php)(/.*)$;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ /\.ht {
deny all;
}
location ~ ^/ojs/cache(.*)$ {
deny all;
}
location ~ /ojs/index.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
serve & no-log static files & images directly
location ~* ^.+.(css|js|xml|jpg|jpeg|gif|png|ico|swf|pdf|doc|xls|tiff|tif|txt|shtml|cgi|bat|pl|dll|asp|exe|class|htm|html)$ {
access_log off;
expires 30d;
try_files $uri =404;
}
serve & log bigger media/static/archive files directly
location ~* ^.+.(avi|mpg|mpeg|mov|wmv|mp3|mp4|m4a|flv|wav|midi|zip|gz|rar)$ {
expires 30d;
try_files $uri =404;
}
}