Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx configuration not working (as per documentation) #29

Open
bovidiu opened this issue Jun 17, 2016 · 4 comments
Open

Nginx configuration not working (as per documentation) #29

bovidiu opened this issue Jun 17, 2016 · 4 comments

Comments

@bovidiu
Copy link

bovidiu commented Jun 17, 2016

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?

@tas2580
Copy link
Owner

tas2580 commented Oct 25, 2016

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

@Naguissa
Copy link
Contributor

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
Copy link
Contributor

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

@scheccia1
Copy link

replace "break" with "last"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants