Posts: 11
Threads: 4
Joined: Jul 2010
2010-11-19, 21:55:26
(This post was last modified: 2010-11-19, 23:04:33 by sophia77.)
Hello
The
Download page says that GS requires PHP 5.2+ and Apache. I'd like to check...
1. if GS really requires Apache, or if any PHP-capable web server will work (Lighttp, Nginx, etc.)
2. if any extra PHP modules are needed, or it'll work with a basic 5.2+ setup
Thank you.
Posts: 1,204
Threads: 30
Joined: Jun 2010
2010-11-19, 22:53:16
(This post was last modified: 2010-11-19, 22:53:33 by BlackRose.)
1. You can use other webservers but GS relies on apache's mod rewrite module. So if you want to take advantage of friendly urls, and directory protection you will have to rewrite module for lighttp, or don't use it at all.
2. you need simplexml, and curl module for php as stay in requirements
Addons: blue business theme, Online Visitors, Notepad
Posts: 11
Threads: 4
Joined: Jul 2010
Thank you. I'll check if the other web servers support URL rewriting + directory protection.
Posts: 1,204
Threads: 30
Joined: Jun 2010
As I've said, lighthttpd offers modrewriting, but it has different syntax than apache's mod rewrite, thus you will have to rewrite the rules by your own.
Basically you have to rewrite the index.php?id=first-page-name to a
www.website.tld/first-page-name type (assuming you will turn off furls in GS admin panel), and edit all .htaccess files placed in GS directories, to prevent from direct access.
you can start here:
http://redmine.lighttpd.net/wiki/1/Docs:ModRewrite
I'm not sure, as I've never used it, but lighthttpd's rewriting seems to be even easier than apache's. If you choose lighttpd, don't forget to share your solutions
Addons: blue business theme, Online Visitors, Notepad
Posts: 11
Threads: 4
Joined: Jul 2010
Posts: 149
Threads: 12
Joined: Dec 2009
works great with nginx
when you set "Use Fancy URLs - Requires that your host has mod_rewrite enabled." you must modify /etc/nginx/sites-enabled/www.yoursite.com.conf
server {
server_name
www.yoursite.com;
root /var/www/www.yoursite.com;
include /etc/nginx/fastcgi_php;
location / {
index index.php;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$id=$1 last;
}
}
}