Thanks Ryan. On Mon, May 17, 2010 at 12:36 AM, Ryan Malayter <malayter@gmail.com> wrote: > On Sat, May 15, 2010 at 6:20 AM, Leonardo Crespo <leo@leocrespo.com> wrote: >> I have about 12 javascripts and 3 css files that need to have expire >> headers set to max, how can I do this? >> > > Use a separate location with different expires settings. It will > prby leocrespo - Nginx Mailing List - English
Nobody? :( On Sat, May 15, 2010 at 9:20 PM, Leonardo Crespo <leo@leocrespo.com> wrote: > I have about 12 javascripts and 3 css files that need to have expire > headers set to max, how can I do this? > > Thank you. > > Leonardo. > _______________________________________________ nginx mailing list nginx@nginx.org http://nginx.org/mailman/listinfo/nginxby leocrespo - Nginx Mailing List - English
I have about 12 javascripts and 3 css files that need to have expire headers set to max, how can I do this? Thank you. Leonardo. _______________________________________________ nginx mailing list nginx@nginx.org http://nginx.org/mailman/listinfo/nginxby leocrespo - Nginx Mailing List - English
Cheers Igor! On Tue, May 11, 2010 at 5:16 PM, Igor Sysoev <igor@sysoev.ru> wrote: > On Tue, May 11, 2010 at 05:02:42PM +1000, Leonardo Crespo wrote: > >> Cheers! >> >> "Note that you should set a name for this server, otherwise nginx will >> use the hostname. " >> >> How do I "set a name" for a server in nginx? > > http://nby leocrespo - Nginx Mailing List - English
Cheers! "Note that you should set a name for this server, otherwise nginx will use the hostname. " How do I "set a name" for a server in nginx? Thanks On Tue, May 11, 2010 at 4:55 PM, Igor Sysoev <igor@sysoev.ru> wrote: > On Tue, May 11, 2010 at 04:44:33PM +1000, Leonardo Crespo wrote: > >> Hi. >> >> How can I disable access by IP to my serverby leocrespo - Nginx Mailing List - English
Hi. How can I disable access by IP to my server and by hosts not defined in server_name? I only have www.domain.com on server_name but people can still access the site via mail.domain.com or by the IP address. Thanks Leonardo. _______________________________________________ nginx mailing list nginx@nginx.org http://nginx.org/mailman/listinfo/nginxby leocrespo - Nginx Mailing List - English
Hi. What's the best way to tell nginx to set expire headers to list of uri? Like: www.domain.com/bigscript.js www.domain.com/weirdfolder/bigstyle.css www.domain.com/yetanotherfolder/bigjpeg.jpg ..... I search the forums and I could only find examples for all files (ico|js|css) and I need the headers only for specific uris. Cheers! Leo _______________________________________________ nginx maiby leocrespo - Nginx Mailing List - English
> Either I am understanding this incorrectly or this sounds like you have > made things worse! > > If the user requests for the static content is going to enter via D, > then what is the point? User download/access of static content should > directly hit nginx running on S which accesses it's local storage. Well in theory user uploads to D and all requests come from S, but if thby leocrespo - Nginx Mailing List - English
Do you guys think have another instance of nginx handling static content on the same server would be a better solution than a dedicated static server? I'd use proxy_pass for both scenarios... Nginx handles things so well that I might have difficulties justifying another server... Cheers On Mon, Apr 12, 2010 at 1:09 PM, Leonardo Crespo <leo@leocrespo.com> wrote: >> I believe that'sby leocrespo - Nginx Mailing List - English
> I believe that's what originally suggested. Indeed Edho, i just expanded upon Arvind's idea to make sure I understand it. > The alternative is beaming the file using ssh to static server's > directory automatically on upload (using php functions, etc). Might > cause slight delay and more complex setup though. Yeah, NFS seems to be the winner. If anyone is interested, I'll followby leocrespo - Nginx Mailing List - English
> 1) Shared filesystem between the two hosts to hold the static content I just found out that I can do that on linode. Thanks for bringing this idea up! Here's a solution: Using NFS, mount on the Dynamic server the Static server's directory for static files (/images /user-uploads etc). Have nginx on Dynamic with proxy_pass to Static for all static content. All uploads go to the mounted driveby leocrespo - Nginx Mailing List - English
> location /uploads/ { > proxy_pass http://10.1.1.2/uploads/ # or whatever > } So the code above is in the .conf file of the Dynamic server and 10.1.1.2 is the Static server's IP, correct? I don't see how this can work still. If a file is Posted to upload.php, it'll end up on Dynamic server and not on Static. On Mon, Apr 12, 2010 at 12:18 PM, Gabriel Evans <me@gabevans.com> wby leocrespo - Nginx Mailing List - English
On Mon, Apr 12, 2010 at 12:17 PM, Arvind Jayaprakash <work@anomalizer.net> wrote: > On Apr 12, Leonardo Crespo wrote: >>To make it simpler, here's a scenario: >> >>Server A is static.domain.com ip 10.10.10.10 servers ALL static >>content (jpegs, gifs, pngs, mp3s etc... including user uploaded >>content like photo albums) >>Server B is www.domain.com ipby leocrespo - Nginx Mailing List - English
To make it simpler, here's a scenario: Server A is static.domain.com ip 10.10.10.10 servers ALL static content (jpegs, gifs, pngs, mp3s etc... including user uploaded content like photo albums) Server B is www.domain.com ip 10.10.10.20 servers DYNAMIC content, php files. If user submits a jpg to his photo album, it'll get uploaded to B, as page's going to run on server B because it's a .php fileby leocrespo - Nginx Mailing List - English
Hi guys. Newbie question here, apologies in advance. By using a static content server (nginx as reverse proxy), how does one deal with user uploads? I mean, I can understand if I client request our website’s /images/logo.png file, because we manually store it on the static content server, but what about the photo that our user just uploaded to his photo album? My confusion is: if a request isby leocrespo - Nginx Mailing List - English
> I'm not sure it's a "great security". There is a lot of spywares in browsers > (the Google Toolbar for example) which will inform about the used address. That's true... would you recommend just having authentication on that location instead? > Outch. I hope your "php includes" doesn't use HTTP to load files... It doesn't, they're all include(); directives. Cheersby leocrespo - Nginx Mailing List - English
Morning guys! Can anyone help with best practice to secure an /portal/admin directory? A link to documentation will do just fine. Our website has and /admin directory which don't want to be accessible via www.domain.com/portal/admin. Instead, we want hackoff.domain.com to point to /portal/admin directory. If we could add authentication to hackoff.domain.com would be great too. The point is someby leocrespo - Nginx Mailing List - English
:-D Cheers mate! On Thu, Apr 8, 2010 at 9:07 PM, Reinis Rozitis <r@roze.lv> wrote: >> Ah that's why! So can I use either one of the 2 options? Care to >> explain the - and + signs in front of try_files? They're not on the >> wiki too. > > It is not configuration option but rather how you make the 'diff': > > - remove the line > + replace the line with thiby leocrespo - Nginx Mailing List - English
G'day mate! > Curly brackets aren't allowed outside quoted strings as they > denote configuration blocks. Ah that's why! So can I use either one of the 2 options? Care to explain the - and + signs in front of try_files? They're not on the wiki too. Cheers! Leo On Thu, Apr 8, 2010 at 7:01 PM, Maxim Dounin <mdounin@mdounin.ru> wrote: > Hello! > > On Thu, Apr 08, 2010 at 09:by leocrespo - Nginx Mailing List - English
Thanks mate, I'll compile it again then. On Thu, Apr 8, 2010 at 4:54 PM, 任晓磊 <julyclyde@gmail.com> wrote: > On Thu, Apr 8, 2010 at 12:17 PM, Leonardo Crespo <leo@leocrespo.com> wrote: >> Is there a way to enable gzip_static without having to recompile with >> >> ./configure --with-http_gzip_static_module >> > No way if you did not specify that optioby leocrespo - Nginx Mailing List - English
Is there a way to enable gzip_static without having to recompile with ../configure --with-http_gzip_static_module ? Cheers Leo _______________________________________________ nginx mailing list nginx@nginx.org http://nginx.org/mailman/listinfo/nginxby leocrespo - Nginx Mailing List - English
Morning! I've searched the wiki for this issue and I wasn't able to solve it, can anyone help? I'm assuming nginx is getting lost with the {} on ${uri}.... This line >try_files $uri.php ${uri}index.php =404; Is giving me this error: >Starting nginx: : directive "try_files" is not terminated by ";" in /usr/local/nginx/sites-enabled/domain.com.au:27 If I remove "$by leocrespo - Nginx Mailing List - English
When i put this location ~ ^/portal/admin/.*\.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_intercept_errors on; fastcgi_index index.php; include /usr/local/nginx/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME /home/public_html/domain.com.au/public/$fastcgi_script_name; } i get this error: Starting nginx: : directive "try_files" is not terminated by ";" in /usr/by leocrespo - Nginx Mailing List - English
I'd to enable the php extension (/foo/page.php) when the url is domain.com.au/portal/admin* Here's my failed attempt and the error I'm getting. I'll make sure to keep reading as much as possible and not to ask questions that are already answered. ------------------- location / { try_files $uri @php; } location @php { try_files $uri.php ${uri}index.php =404; fastcgi_pass 127.0.0.1:9000; faby leocrespo - Nginx Mailing List - English
Thanks Igor, it makes sense now. Thanks for the link it was helpful too. Cheers Leo 2010/4/7 Igor Sysoev <igor@sysoev.ru>: > On Wed, Apr 07, 2010 at 07:26:31PM +1000, Leonardo Crespo wrote: > >> I can't make sense of those 2. >> >> > try_files $uri.php ${uri}index.php =404; >> >> This means: if the uri is xxx, try to serve xxx.php. If you can't,by leocrespo - Nginx Mailing List - English
Just curious, Why the {} in ${uri}index.php and not in $uri.php? I'm assuming it's to identify uri as a keyword, but wouldn't it be necessary on the $uri.php as well? On Wed, Apr 7, 2010 at 7:26 PM, Leonardo Crespo <leo@leocrespo.com> wrote: > I can't make sense of those 2. > >> try_files $uri.php ${uri}index.php =404; > > This means: if the uri is xxx, try to serveby leocrespo - Nginx Mailing List - English
I can't make sense of those 2. > try_files $uri.php ${uri}index.php =404; This means: if the uri is xxx, try to serve xxx.php. If you can't, try serving xxxindex.php. If you can't still, return 404. > try_files $uri.php $uri/ =404; This means: if the uri is xxx, try to serve xxx.php. If you can't, try serving xxx/ . If you can't still, return 404. Correct? They both work fine, whatby leocrespo - Nginx Mailing List - English
Hi Edho, thanks. Igor mentioned i should keep this to avoid serving php as static files. location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_intercept_errors on; fastcgi_index index.php; include /usr/local/nginx/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME /home/public_html/boysdownunder.com.au/public/$fastcgi_script_name; } Will it conflict with this? > location ~ \.by leocrespo - Nginx Mailing List - English
Wow, very elegant Igor. Thank you, it works beautifully. Could you help with the last bit? I'd like to return 404 if the user tries /foo/page.php instead of /foo/page I read the nginx wiki for try_files (http://wiki.nginx.org/NginxHttpCoreModule#try_files) and coudn't find the advanced syntax that you've given me to use (and that it works great). Is there any other nginx info resource that youby leocrespo - Nginx Mailing List - English
Hi all! Can anyone with more experience give me hand? I've spent the last 4 hours trying many options and none of them worked, so I decided to ask for help. What i'm trying to do: /foo/bar/page served by /foo/bar/page.php This one is working fine, as I can remove the.php extension from the request and the page loads o (www.domain.com/page shows the content of www.domain.com/page.php) Howeveby leocrespo - Nginx Mailing List - English