Well... I found this: http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/ So I changed the code to: ... location ~* ^.+\.(css|gif|jpg|js|png|swf)$ { rewrite ^(.+)\.(\d+)\.(css|js)$ $1.$3 last; root /home/web/statics/; expires max; add_header Cache-Control public; } ...by illarra - How to...
I want to read the static files of my website using this kind of URLs: {filename}.{timestamp}.{extension} ex. jquery.1234567890.js The idea is to control what version of the file is being cached by the browser. Then when I ask nginx to serve the file, I would like to serve directly the jquery.js file. So I'm dealing with some kind of rewrite. I know where I have to put it, but not hoby illarra - How to...
This is how I solved it finally. I use nginx for the domain redirect: server { listen 0.0.0.0:80; server_name static.domain.com; location / { root /home/web/static/; expires 40d; add_header Cache-Control public; } } server { listen 0.0.0.0:80; server_name domain.com www.domain.com; if ( $host != 'domain.com' ) { rewrite ^by illarra - Nginx Mailing List - English
Hi Héctor, The app works ok, so Apache and Nginx are running. It is just that I need to keep the index.php file to make it work :) For example, i have http://www.domain.com/index.php/blog/id/title.html But it should work without index.php http://www.domain.com/blog/id/title.htmlby illarra - Nginx Mailing List - English
By the way, this is a bigger snippet of my nginx.conf file, showing how I'm dealing with statics. I just need to connect properly nginx and Apache, as the statics are server via another domain... server { listen 0.0.0.0:80; server_name static.domain.com; location / { root /home/web/static/; expires 40d; add_header Cache-Control public; } } serveby illarra - Nginx Mailing List - English
To Gabriel: Actually, I get an Apache 404 Error: "The requested URL /es was not found on this server." To Héctor: Have tried also your suggestion, but then I can't get the ngix.conf file to work :) Where do I have to write this code exactly?by illarra - Nginx Mailing List - English
Hi! I have a website running on a Nginx + Apache configuration. Nginx serves the static content (in a different domain) and proxies directly to Apache, where all the PHP is executed. The problem is that my app uses mod_rewrite, and I can't find where I have to put the rules. This is a snippet of nginx.conf... server { listen 0.0.0.0:80; server_name domain.com; locationby illarra - Nginx Mailing List - English
I solved it using diferent ports: 80, 8000, 8010, 8011, etc. Thanks for the help.by illarra - How to...
General comments: [*] This is a simplified example, I'm using nginx to serve static contents from a specified folder (that works) [*] This is what I have in the firts line "user nginx root"; the master process is owned by "root" and the rest are owned by "nginx". it seems there are no problems launching processes... [*] You were right with the "alias".by illarra - How to...
It seems you are in the right path... :) This is what I have 2009/05/27 16:45:21 18277#0: conflicting server name "alias" on MY.IP:80, ignored 2009/05/27 16:45:21 18277#0: the configuration file /opt/local/etc/nginx/nginx.conf syntax is ok 2009/05/27 16:45:21 18277#0: open() "/var/spool/nginx/nginx.pid" failed (13: Permission denied) 2009/05/27 16:45:21 18277#0: theby illarra - How to...
That change doesn't make any difference. It always shows the first domain I configure in Apache.by illarra - How to...
Hi everybody, I want to have Nginx proxying to Apache, so that Apache is only worried about PHP, and all the static files are directly served by Nginx. The idea is that all calls are managed by Nginx in the first moment. So I have Nginx listening to my IP, and Apache listening to Localhost. With only one domain, I can make it work: static for Nginx and PHP for Apache. But, when I try to mby illarra - How to...
Seems to be solved. For some reason, it works fine with a break: rewrite ^/(.*)$ /index.php?r=$1?$args break;by illarra - How to...
Thanks Jim, but doesn't solve the problem. This is what I have: server { listen IP:80; server_name mydomain.com alias www.mydomain.com; location / { rewrite ^/(.*)$ /index.php?r=$1?$args last; proxy_pass http://127.0.0.1:80; } } In fact, I get a 500 Internal Server Error. And if I see the nginx log, I can read: 2009/05/16 07:47:34 3188#0: *by illarra - How to...
Hi! I have made a installation with Nginx as Frontend Server, proxying some dynamic requests to Apache (to serve a PHP app). I have it almost working, but I need some help with the Rewrite module. The installation has this characteristics: - Nginx is listening to ports IP:80 and IP:443 - Nginx serves directly calls to static.mydomain.com (all images, js, css, flash... are there) - Nginx proxby illarra - How to...