Im currently using Apache + Wordpress configuration but I need to get work my Wordpress site on <strong>Lighttpd server</strong>. Everything is working except PERMALINKS. I found cupple tutorials, how to fix it, but no of them was working correctly.
<strong>Here is needed permalinks structure:</strong>
Custom Structure: /%category%/%postname%/
Category base: serialy
You can check it here on screenshot [[LINK href="http://exot.boo.sk/permalinks.jpg"]]http://exot.boo.sk/permalinks.jpg[[/LINK]]
<strong>Here is my current Apache .htaccess</strong>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
<strong>I also NEED to use HyperCache plugin there.</strong>
I need some how-to, or right lighttpd config file for this. Like I said, I found some tutorials on the internet, but nothing was working. Main page was working, category was working, post page was not working, it returned only white empty window.
its [[LINK href="http://iserialy.sk/"]]http://iserialy.sk/[[/LINK]] page
thanks
Arania Jain answers:
Hello,
I just did a test setup of wordpress with lighttpd with PHP and MySQL on a VPS with CentOS 5.3
I added the following to the default lighttpd config file -
/etc/lighttpd/lighttpd.conf
You also need to make sure the following line is not commented in the server.modules section of your main lighttpd config file above -
[...]
"mod_rewrite",
[...]
The rewrite rules -
url.rewrite-once = (
"^/(wp-.+).*/?" => "$0",
"^/(sitemap.xml)" => "$0",
"^/(xmlrpc.php)" => "$0",
"^/keyword/([A-Za-z_0-9\-]+)/?$" => "/index.php?keyword=$1",
"^/.*?(\?.*)?$" => "/index.php$1"
)
This is when you are hosting a single site with the default virtual host. If you are hosting multiple sites, you need to put this code in the respective file for your virtual host. Also, these rules assumes that wordpress is installed in the root directory of the virtual host.
The permalink settings are similar to what you use here - [[LINK href="http://exot.boo.sk/permalinks.jpg"]]http://exot.boo.sk/permalinks.jpg[[/LINK]]
Also, I installed and enabled the Hyper Cache plugin, and everything is working fine. You can see this in action here - [[LINK href="http://72.9.238.114/"]]http://72.9.238.114/[[/LINK]]
Regards
ulgaming answers:
Hello,
This will work out for you. Make sure that mod_rewrite line has been uncommented in the lighttpd file if you have your own server/VPS. If you have a shared hosting or a managed hosting, you can ask them to enable mod_rewrite module for you.
If you have a Wordpress blog installed in the root of your domain or sub-demain, you have to use:
$HTTP["host"] =~ "{yourdomain}" {
var.app = "{yourdomain}"
accesslog.filename = base + "/logs/" + app + ".access.log"
server.errorlog = base + "/logs/" + app + ".error.log"
load php app
url.rewrite = (
"^/(wp-.+).*/?" => "$0",
"^/(sitemap.xml)" => "$0",
"^/(xmlrpc.php)" => "$0",
"^/(.+)/?$" => "/index.php/$1"
)
}
If you use a Wordpress blog installed in a sub-folder (e.g. /blog/)
$HTTP["host"] =~ "{yourdomain}" {
var.app = "{yourdomain}"
accesslog.filename = base + "/logs/" + app + ".access.log"
server.errorlog = base + "/logs/" + app + ".error.log"
load php app
url.rewrite = (
"^/?$" => "/blog/index.php",
"^/blog/(wp-.+)$" => "$0",
"^/blog/xmlrpc.php" => "$0",
"^/blog/sitemap.xml" => "$0",
"^/blog/(.+)/?$" => "/blog/index.php/$1"
)
}
Note: the xmlrpc.php rule is necessary for external access and the sitemap.xml file is something for Google Sitemaps.
Marius Andra answers:
For all the files in your webroot folder which you want accessible, do this:
"^/(favicon.ico)" => "$0",
For example I just placed a favico.ico file there and had to add this to my config file to it would work neatly.
If you have the "Google XML Sitemaps" plugin installed, then you should also share this one:
"^/(sitemap.xml.gz)" => "$0",