Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web2py and wordpress on lighttpd

I have python web2py installed on lighttpd server, but i want to add wordpress for blogging, the problem is i want wordpress to be on site.com/blog not as subdomain, How can i manage lighttpd configuration to run!

url.rewrite-once = (
           "^/$" => "/ad",
            "^(/.+?/static/.+)$" => "/applications$1",
            "(^|/.*)$" => "/fcgihandler.fcgi$1", <-- tried to exclude 
            "/blog$" => "$0", <-- tried to exclude /blog from rewriting
    )

also added fastcgi support for php-cgi

fastcgi.server = (
            ".fcgi" => ("localhost" => (
                    "check-local" => "disable",
                    "min-procs" => "1",
                    "max-procs" => "2",
                    "socket" => "/tmp/web2py.sock"
            )),
            ".php" => ("localhost" => (
                    "socket" => "/tmp/php.socket"
            ))
    )

Couldn't do it though, any advices please !

like image 528
Omiga Avatar asked Aug 15 '26 15:08

Omiga


1 Answers

Try this rewrite:

$HTTP["host"] =~ "domain.com" {

server.document-root = "/var/www/app/webroot/"
url.rewrite-once = (
       "^/blog/(.*)$" => "/blog/index.php/$1",
       "^/$" => "/ad",
        "^(/.+?/static/.+)$" => "/applications$1",
        "(^|/.*)$" => "/fcgihandler.fcgi$1",
 )

 }
like image 79
MGP Avatar answered Aug 18 '26 04:08

MGP



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!