ilosuna / phpsqlitecms

phpSQLiteCMS is a simple and lightweight web content management system based on PHP and SQLite.
phpsqlitecms.net
MIT License
138 stars 75 forks source link

Tip:Nginx Config and Bootswatch theming #7

Open mnshankar opened 10 years ago

mnshankar commented 10 years ago

Hi, Thanks for your work on this! I love the simplicity and features offered by this CMS and I use it on my personal VPS. I was able to get it working with Nginx webserver using the following nested location directives in my config script:

location / {
 #stuff specific to your root goes here
 location ~ /blog/[^\.]+$ {
       rewrite ^/blog/(.*)$ /blog/index.php?qs=$1;
       location ~/blog/cms/[^\.]*$ {
              rewrite  ^/blog/cms/(.*)$ /blog/cms/index.php?qs=$1;
              }
     }
}

So, in my setup, /blog (containing phpsqlitecms) is nested under my root webspace (/)

Also, another tip: It is quite easy (and fun) to swap out themes from bootswatch (http://www.bootstrapcdn.com/#bootswatch_tab) by editing the /cms/templates/default.tpl file and replacing the default bootstrap cdn url :-)

unbelll commented 8 years ago

Oh thank you @mnshankar

And this is your config, but for case when phpsqlitecms placed in the root

location ~ /[^.]+$ { rewrite ^/(.)$ /index.php?qs=$1; location ~/cms/[^.]$ { rewrite ^/cms/(.*)$ /cms/index.php?qs=$1; } }