seourls icon indicating copy to clipboard operation
seourls copied to clipboard

Nginx configuration not working (as per documentation)

Open bovidiu opened this issue 8 years ago • 4 comments

As per documentation i've configured my forum for nginx, however, when it is to access a forum topic, i get 404

Cannot find GET /lorem-ipsum-f4/lipsum-t2.html

Could you please suggest a solution?

bovidiu avatar Jun 17 '16 09:06 bovidiu

Sorry but I have no nginx installed, maybe someone who uses nginx can give me his working rewrite config.

tas2580 avatar Oct 25 '16 12:10 tas2580

Hello,

Form my LOCAL server (still making tests on local) I had to remove extra "break" at the en of lines:

location / {
            # First attempt to serve request as file, then as directory, then trigger 404
            try_files $uri $uri/ /index.php?q=$uri&$args;

## SEO URLs
rewrite ^/(.*)-f([0-9]*)/(.*)-t([0-9]*)-s([0-9]*).html /viewtopic.php?f=$2&t=$4&start=$5&$query_string;
rewrite ^/(.*)-f([0-9]*)/(.*)-t([0-9]*).html /viewtopic.php?f=$2&t=$4&$query_string ;
rewrite ^/(.*)-f([0-9]*)/index-s([0-9]*).html /viewforum.php?f=$2&start=$3&$query_string;
rewrite ^/(.*)-f([0-9]*)/ /viewforum.php?f=$2&$query_string;
rewrite ^/(.*)-f([0-9]*) /viewforum.php?f=$2&$query_string;
## End SEO URLs

}

Anything special in other lines: block "^.ht" files (htacces and .htpassword) and configure php-fpm for .php files.

Still I cannot see sitemap I was checking issues before opening new ticket...

Naguissa avatar Nov 17 '16 12:11 Naguissa

Oh! The issue I has having was to download PHP code files instead execute them!

Naguissa avatar Nov 17 '16 12:11 Naguissa

replace "break" with "last"

scheccia1 avatar Mar 02 '17 08:03 scheccia1