I have the following nginx configuration (at /etc/nginx/sites-available/default)
server {
listen 80; ## listen for ipv4; this line is default and implied
listen [::]:80 default ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www;
index index.php index.html index.htm;
server_name _;
location / {
try_files $uri $uri/ /index.html;
}
error_pag
I'm stuck with a File Not Found issue with Nginx and FastCGI for PHP. Could someone have a look at my conf file?
Still pretty new to nginx here, trying to get a simple rewrite to work, but the server just responds '404 not found'
My server block
server {
listen 80;
listen [::]:80;
server_name pics.example.com;
root /home/pics;
rewrite ^(.*)$ index.php?tag=$1;
location / {
try_files $uri $uri/ $uri.php /index.html $uri =404;
#try_files $uri =404;
fastcgi_split_path_info ^([a-z]+)(/.+)$;
I just transfered a website to a new server; here is my sites conf (vhost) in nginx and the last 2 entries from error.log .
The images are not displaying when the index.php loads.
regars,
server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name maissane;
access_log /var/log/nginx/localhost.access.log;
root /var/w
i have nginx configured like this:
server {
listen 80;
listen [::]:80 default ipv6only=on;
root /www/repos/havi/$subdomain;
index index.php;
server_name domain.com *.domain.com;
set $subdomain "www";
location /
{
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
I have the following nginx location block:
location ^~ /publish {
allow 127.0.0.1;
#Allow home
allow 99.100.101.102;
deny all;
}
Then this location block to process PHP after:
location ~\.php {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
include /e
I have been having trouble getting a php script to work with nginx. Invoking the script my-url:90/useraccessauthorization/useraccessauthorization.php gives me a 404 error.
Below are my configuration details. Could someone please let me know what I am missing?
I am trying to get rid of index.php from the default Zend Framework route. I think it should be corrected at the server level and not on the application.
I can't figure out how to redirect / to index.html.