Results 1 to 3 of 3
  1. #1

    nginx config help

    Hello Everybody,

    Little help needed with an nginx config.

    Currently I have set it as follows.

    location ~* \.(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|js|css)$ {
    root /home/username/public_html;

    location / {
    proxy_pass http://another_server;

    Now, I want to send the following request(image inside passthru_folder) to proxy instead of serving from nginx.

    Without this, nginx return 404 as there is no such folder.

  2. #2
    Join Date
    Apr 2009
    The better way to do is that remove jpg extension from location so all jpg requests will be auto forward to backend (httpd). But this will effect entire account not only passthru_folder folder.
    Offering Reliable Shared, Reseller, Master Reseller and Shoutcast Hosting.
    High Performance VPS Hosting with 99.9% Uptime.
    Hosting Since 2006 Locally and Since 2008 Globally.

  3. #3
    Join Date
    Feb 2008
    Houston, Texas, USA
    Try this:

    location ~* \.(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|js|css)$ {
    root /home/username/public_html;
    error_page    404 = @retry;
    location @retry {
    proxy_pass http://another_server;
    location / {
    proxy_pass http://another_server;
    Joe / UNIXY
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe >

Similar Threads

  1. Nginx Admin: The Free cPanel Nginx automated installer Plugin
    By JohnCS in forum Software & Scripts Offers
    Replies: 13
    Last Post: 05-21-2011, 11:45 AM
  2. help nginx
    By imanewbie in forum VPS Hosting
    Replies: 5
    Last Post: 06-19-2010, 11:25 AM
  3. File Server Setup With do I choose the config for the server?
    By azn_romeo_4u in forum Hosting Security and Technology
    Replies: 8
    Last Post: 04-22-2009, 07:49 PM
  4. libtool problem with config.lo while apache config/make
    By one1coolone1 in forum Dedicated Server
    Replies: 3
    Last Post: 04-20-2005, 11:15 PM
  5. Where is config.xml - Trying to config Cerberus
    By sabotage79 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 02-13-2003, 07:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts