-
Notifications
You must be signed in to change notification settings - Fork 88
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
URL Rewriting for nginx #753
Comments
This is awesome, I'm not aware that anyone has documented how s9y could be run with nginx. In your blog jQuery and modernizer seem to fail loading, is that caused by nginx or is it from different changes? In my eyes, the most important work the .htaccess does is blocking the serendipity_config_local.inc.php from being opened (I checked, it's not accessible in your blog). I don't see that replicated in the config - is it handled elsewhere? It would be great if you could continue working on this! Three things I see that could be done to make this accessible for everyone:
|
I forgot a rule. The
As far as I know, nginx ignores apache-style .htaccess files. |
So is this a workable thing now? I remember wanting to run s9y on nginx in the past, but couldn't because I had no idea how to do this very thing... cc: @onli for input |
@SlidingHorn I didn't test it yet (and are unlikely to do so, since my Apache setup works and is automatically enabled on my dev server). But the nginx config justinacolmena has shown above looks good. If you are interested in that setup, I'd recommend to just test it. If you can login to the backend, write articles and comments, read articles and - very important! - not access the serendipity_config_local.inc.php, then everything else is very likely to work as well. |
@onli I'll throw up a VM over the weekend if I have time and give it a shot |
Much easier than one would think at first.
Configuration > Appearance and Options > URL Rewriting [i] > Use Apache mod_rewrite
Of course this is not actually using Apache mod_rewrite. This is the relevant snippet from
/etc/nginx/nginx.conf
with all the rewriting rules. As far as I can tell, it all works, but the rules from.htaccess
as written by the config still need a lot of cleanup for apache, because some of them are wrong.The text was updated successfully, but these errors were encountered: