Welcome! Log In Create A New Profile

Advanced

Pyrocms - everything works, except for a virtual directory..

Posted by talkingnews 
Pyrocms - everything works, except for a virtual directory..
August 21, 2012 05:55PM
I'm using a module in PyroCMS called Pyrostreams.

Everything about the entire setup works fine, except it appears to be trying to call a couple of files from a "virtual" directory, which doesn't exist.

Here's the log entry:

"GET /streams_core/field_asset/css/datetime/datepicker.css HTTP/1.1" 404

The file actually exists in

/www/cms/system/cms/modules/streams_core/field_types/datetime/css

The author says it works just fine in Apache, and isn't himself able to install nginx.

Here's the nginx config that Pyrocms suggest:
http://docs.pyrocms.com/2.1/manual/index.php/general/getting-started/alternate-server-environments/nginx-with-php-fpm

Here's the complete nginx config file I'm using:
https://gist.github.com/3419706

And here's the .htaccess file that comes with the application (for those using Apache)
https://gist.github.com/3419710

Been round in a few circles trying to figure this out - a bit lost now. Any ideas would be appreciated.
Re: Pyrocms - everything works, except for a virtual directory..
August 24, 2012 09:04AM
Found the solution at another forums. To cut a long story short, the pyrocms nginx example at http://docs.pyrocms.com/2.1/manual/index.php/general/getting-started/alternate-server-environments/nginx-with-php-fpm needs tweaking:

Firstly, the dots should be escaped:

So

location ~ .php {

should be

location ~ \.php {

Also, instead of being served up "straight", for some reason the datepicker css and js is served via the interpretor.

So

location ~* .(?:ico|css|js|gif|jpe?g|png)$ {

should be

location ~* \.(?:ico|gif|jpe?g|png)$ {

and everything works! Serving up js and css via php like this has the implication that the css and js will not be cacheable which is going to affect pagescore, but I'm sure there's a way round that somehow.

Full story: http://www.howtoforge.com/forums/showthread.php?p=284084
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready