Topic: Nginx, GetSimple CMS and preety urls, too.
Did anybody install this on nginx?
You are not logged in. Please login or register.
We had problems with our forum being hacked. From what we can tell, all data is safe, but it forced us to upgrade our PunBB installation. Announcement
GetSimple Support Forum → Installation & Setup → Nginx, GetSimple CMS and preety urls, too.
Did anybody install this on nginx?
I haven’t tried installing it on nginx, and frankly I find it a bit hard to find a lot of information on that server system.
GetSimple needs PHP5 with the SimpleXML lib to run, if you can get that to run on nginx I don’t see a reason why it wouldn’t run.
I am working on deploying it right now, I've got wordpress working, previously, but for now I can't get it to work, digging into it :)
I hope I will have enough strengths to write short tutorial on the subject here, once I am done.
Okay, here is the conf I've used (it's based on that for wordpress, so in case you want to deploy simplecms on nginx, google for deploying worpdress, try it, see that it works (or just find the php part, since we don't need mysql for simplecms).
vim /etc/nginx/sites-available/test.com
server {
listen 80;
#TODO: make www to redirect!
server_name test.com;
access_log /var/log/nginx/test.com.access.log;
error_log /var/log/nginx/test.com.error.log;
location / {
root /var/www/test.com;
index index.html index.htm index.php;
# this serves static files that exist without running other rewrite tests
if (-f $request_filename) {
expires 30d;
break;
}
# this sends all non-existing file or directory requests to index.php
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?id=$1 last;
}
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/test.com$fastcgi_script_name;
}
}So, everything I needed to change (everything that is different from wordpress) is that rewrite rule:
instead of
rewrite ^(.+)$ /index.php?q=$1 last;
we do
rewrite ^(.+)$ /index.php?id=$1 last;(substituted q with id)
Help this will help to somebody :)
PS I am deploying PHP with php-fpm, google "nginx php-fpm"
Thanks. You saved me a lot of time.
Thanks. You saved me a lot of time.
don't do the rewrite, that's not efficient. And use try_files. I gave a few examples of nginx config in a different thread. When i have time i'll post a better config for newer nginx versions (1+)
GetSimple Support Forum → Installation & Setup → Nginx, GetSimple CMS and preety urls, too.
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 4 official extensions. Copyright © 2003–2009 PunBB.