hi all. have made some progress setting up providence 1.7.8 and pawtucket2 with nginx, thanks to some references on the forum and in the gitter chat. some working confs are attached below if that is useful for anyone.
everything has worked great for development and local access. i'm now trying to make an nginx .conf file that will allow access to pawtucket only. using the file i have now i can access the main pawtucket page but any links return a 404 error. i imagine it's due to the php redirection or location blocks not being set up correctly?
currently i have these blocks in the conf (please ignore the amateur use of the default nginx directory):
location / {
root /usr/share/nginx/html/providence/pawtucket;
index index.php;
try_files $uri $uri/ /index.php/$uri?$args;
}
and
location ~* \.php {
root /usr/share/nginx/html/providence/pawtucket;
try_files $uri =404;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
client_max_body_size 2000M;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
}
i've also tried
location ~* \.php {
root /usr/share/nginx/html/providence;
location ~ \.php$ {
root /usr/share/nginx/html/providence/pawtucket;
location ~ \.php$ {
root /usr/share/nginx/html/providence;
any help is greatly appreciated.
the confs attached are:
A1, B1, B2 - tested working
EDIT:
A1, B1 - tested working
B2 - thought B2 was working but it turns out it has the same issue with pawtucket loading the front page, but no links working.
C1, C2 - in progress
A1nginxdev.conf = the basic /etc/nginx/nginx.conf file i was using during development. it's set up to work with installs in /usr/share/nginx/html/phpmyadmin, /usr/share/nginx/html/providence and /usr/share/nginx/html/providence/pawtucket2 . apparently it's better practice to set up sites elsewhere than nginx/html (/var/www?)...should be easy enough to change the directories in the conf file.
i then wanted to split the site configuration out of the main nginx.conf file and began using:
B1nginxprod.conf = the main nginx config that is in /etc/nginx/nginx.conf still
B2localprod.conf = /etc/nginx/conf.d/local.conf which allows for access to myphpadmin and providence, through a different port
(the biggest pain was realizing the default php instructions to use location ~ .php$ {had to be updated to location ~* .php { ...hence the obsession above)
EDIT: turns out this only worked as far as the front page of providence. it causes the same issue described above.
lastly i've attached the confs in progress, trying to make it so only pawtucket is internet exposed
C1httpsredirect.conf = redirects any http:// requests to https://
C2liveprod.conf = /etc/nginx/conf.d/live.conf - for access to pawtucket2 only - not working currently