<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Nginx Forum - How to...</title>
<description>Need help setting up WordPress? Using cgi? Something else? Post it here.</description><link>http://forum.nginx.org/list.php?11</link><lastBuildDate>Sat, 25 May 2013 18:14:32 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?11,239534,239534#msg-239534</guid>
<title>nginx head sever with multy wordpress servers (no replies)</title><link>http://forum.nginx.org/read.php?11,239534,239534#msg-239534</link><description><![CDATA[Hi all,<br /><br />Im very new to nginx and got very lost with its configuration, what i am trying to achive in a vmware enviroment is to have 2 Debian servers 1st is master 2nd is a slave/backup running of 1 internet conection, behind these servers are 10 debian virtualmachines each running ther own Apache with wordpress and group-office webmail and there own domain names eg: mysite.dvrdns.org with static internal ip addresses eg: 192.168.101 - 192.168.110.<br /><br />1: How do i configure the first 2 servers as master/slave with nginx to forward requests on to the appropriate virtualmachine.<br /><br />2: what needs to be done on the virtualmachines to accept the requests from the first 2 master/slave servers.<br /><br />I have attached immage of topology.]]></description>
<dc:creator>sgtwirehead</dc:creator>
<category>How to...</category><pubDate>Sat, 25 May 2013 06:14:32 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239531,239531#msg-239531</guid>
<title>Help：nginx1.3.8 with SPDY as reverse proxy, running on SUSE linux, but some resource's waiting time is long. (no replies)</title><link>http://forum.nginx.org/read.php?11,239531,239531#msg-239531</link><description><![CDATA[Hi all:<br /><br />I used Nginx1.3.8 with SPDY but did not use ssl (I have modified source code to support it).<br />Nginx server is used as reverse-proxy ,backend is Varnish as cache server.<br /><br />I access Nginx with chrome brower. first, open a web page A, then quickly open several other web pages B, C, D, E, F, G, H, I, during these web pages are freshing, refresh the web page A. some resources, which its http response status is 304, but its waiting time is long, even spent more than 10 seconds.<br /><br />from debug log, I found that writer handler is not run at once but delay a while, and I don't know why:<br />Line 353292: 2013/05/23 16:17:56 [debug] 23678#0: *20 spdy finalize request: -2, &quot;/dy/deco/2012/0914/w0914_news_zyc_newLogo.gif.acce.ic.hKuTaTT3V5.png?&quot; a:1, c:1<br />Line 429838: 2013/05/23 16:18:06 [debug] 23678#0: *20 spdy run request: &quot;/dy/deco/2012/0914/w0914_news_zyc_newLogo.gif.acce.ic.hKuTaTT3V5.png?&quot;<br />Line 429839: 2013/05/23 16:18:06 [debug] 23678#0: *20 spdy writer handler: &quot;/dy/deco/2012/0914/w0914_news_zyc_newLogo.gif.acce.ic.hKuTaTT3V5.png?&quot;<br /><br />configure:<br />./configure --prefix=/nginx_path/proxy/nginx/ \<br />--sbin-path=/nginx_path/proxy/nginx/sbin/ \<br />--conf-path=/nginx_path/proxy/nginx/nginx.conf \<br />--pid-path=/nginx_path/proxy/nginx/nginx.pid \<br />--error-log-path=/nginx_path/proxy/nginx/log/error.log \<br />--http-log-path=/nginx_path/proxy/nginx/log/access.log \<br />--with-poll_module --with-pcre=/nginx_path/proxy/pcre-8.31 \<br />--with-pcre-jit --with-zlib=/nginx_path/proxy/zlib-1.2.7 \<br />--with-debug --add-module=src/third_party/nginx_upstream_hash-0.3.1<br /><br />debug info and nginx.conf are include in error.tar.gz<br /><br />and my SUSE linux system is:<br /><br />linux-fast-1:~&gt; uname -a<br />Linux vm91221 2.6.32.54-0.3-xen #1 SMP 2012-01-27 17:38:56 +0100 x86_64 x86_64 x86_64 GNU/Linux<br /><br />linux-fast-1:~ # lsb_release -a<br />LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch<br />Distributor ID: SUSE LINUX<br />Description: SUSE Linux Enterprise Server 11 (x86_64)<br />Release: 11<br />Codename: n/a]]></description>
<dc:creator>tianxinshi</dc:creator>
<category>How to...</category><pubDate>Sat, 25 May 2013 04:48:53 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239512,239512#msg-239512</guid>
<title>Insert Ad's in free internet traffic. (no replies)</title><link>http://forum.nginx.org/read.php?11,239512,239512#msg-239512</link><description><![CDATA[Hi folks,<br /><br />I don't mean to sound evil. I am trying to give free internet to my users and want to insert ad's in the internet traffic. Hoping the revenue will help support free internet. I want to use Nginx as a Cache Proxy instead of Squid. I came across mod_layout in Apache, which I understand, inserts ad's in Header and Footer dynamically. I like Nginx as it feels faster than Apache.<br /><br />Would appreciate any advice.<br /><br />Cheers]]></description>
<dc:creator>hdavy2002</dc:creator>
<category>How to...</category><pubDate>Fri, 24 May 2013 09:49:22 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239508,239508#msg-239508</guid>
<title>Removing port from fastcgi redirects (no replies)</title><link>http://forum.nginx.org/read.php?11,239508,239508#msg-239508</link><description><![CDATA[I'm having an issue where some redirects on a website have the proxy-pass port included, rendering them useless. My configuration is as follows:<br /><br />Physical server 1:<br /><br />server {<br />server_name example.com www.example.com;<br /><br />location / {<br />proxy_pass http://1.1.1.1:50493;<br />proxy_set_header X-Real-IP $remote_addr;<br />proxy_set_header Host &quot;example.com&quot;;<br />}<br />}<br /><br /><br /><br />Physical Server 2:<br /><br />server {<br />listen 50493;<br />server_name example.com www.example.com;<br /><br />set_real_ip_from 1.1.1.1;<br /><br />root /var/www/example.com;<br />index index.php index.htm index.html;<br /><br />location / {<br />if ($http_host !~ &quot;^example.com&quot;){<br />set $rule_0 1$rule_0;<br />}<br />if ($rule_0 = &quot;1&quot;){<br />rewrite ^/(.*) http://example.com/$1 permanent;<br />}<br />rewrite /[^/]+/([0-9]+)-[^/]+.html http://example.com/showthread.php?t=$1 permanent;<br />}<br /><br />location ~ .php$ {<br />fastcgi_pass 127.0.0.1:9000;<br />fastcgi_index index.php;<br />fastcgi_param SCRIPT_FILENAME /var/www/example.com$fastcgi_script_name;<br />include fastcgi_params;<br />fastcgi_read_timeout 600s;<br />fastcgi_buffer_size 512k;<br />fastcgi_buffers 16 512k;<br />}<br />}<br /><br /><br />Generally, browsing works fine. The site is browsable as one expects. However some links that redirect (eg. after a login action), redirect to a link with the port 50493 included. So we get http://example.com:50493/index.php for example. That will not work. My question is, how do I remove the port in such cases?]]></description>
<dc:creator>zibralis</dc:creator>
<category>How to...</category><pubDate>Fri, 24 May 2013 07:34:02 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239491,239491#msg-239491</guid>
<title>Nginx conf not working all of a sudden. What is the proper way to write this? (1 reply)</title><link>http://forum.nginx.org/read.php?11,239491,239491#msg-239491</link><description><![CDATA[First of all, let me state that I am brand new to nginx and I have not yet gotten to that point where I am able to diagnose issues on my own. So I am hoping one of you guys will be able to help me out!<br /><br />I had a VPS running with nginx and the following file, but then I HAD to delete the installed operating system and reinstall Arch Linux. It was working with THIS EXACT configuration file (nginx.conf) and now after I reinstalled the VPS and reuploaded the same exact conf file (I made a backup of it before reinstalling) it refuses to work. When I &quot;`sudo systemctl restart nginx`&quot;, it gives me the following error: `&quot;Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.&quot;`<br /><br />This is the conf file I am referring to:<br /><br />#user html;<br />worker_processes 4;<br /><br />#error_log logs/error.log;<br />#error_log logs/error.log notice;<br />#error_log logs/error.log info;<br /><br />#pid logs/nginx.pid;<br /><br /><br />events {<br />worker_connections 1024;<br />}<br /><br /><br />http {<br />include mime.types;<br />default_type application/octet-stream;<br /><br />#log_format main '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '<br /># '$status $body_bytes_sent &quot;$http_referer&quot; '<br /># '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';<br /><br />#access_log logs/access.log main;<br /><br />sendfile on;<br />#tcp_nopush on;<br /><br />#keepalive_timeout 0;<br />keepalive_timeout 65;<br /><br />gzip on;<br /><br />server {<br />listen 80;<br />server_name localhost;<br /><br />#charset koi8-r;<br /><br />#access_log logs/host.access.log main;<br /><br />location / {<br />root /usr/share/nginx/html;<br />index index.html index.htm index.php;<br />}<br /><br />#error_page 404 /404.html;<br /><br /><br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/html;<br />}<br /><br />location ~ \.php$ {<br />fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;<br />fastcgi_index index.php;<br />root /usr/share/nginx/html;<br />include fastcgi.conf;<br />}<br /><br />location ~ /\.ht {<br />deny all;<br />}<br />}<br /><br /><br />server {<br />listen 80;<br />server_name www.brackishmedia.com brackishmedia.com;<br /><br />#charset koi8-r;<br /><br />#access_log logs/host.access.log main;<br /><br />location / {<br />root /usr/share/nginx/brackishmedia.com/html;<br />index index.html index.htm index.php;<br />}<br /><br />#error_page 404 /404.html;<br /><br /><br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/html;<br />}<br /><br />location ~ \.php$ {<br />fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;<br />fastcgi_index index.php;<br />root /usr/share/nginx/brackishmedia.com/html;<br />include fastcgi.conf;<br />}<br /><br />location ~ /\.ht {<br />deny all;<br />}<br />}<br /><br />include /usr/share/nginx/rescuechurchmiami.com/conf/*;<br /><br />}<br /><br /><br />If I remove the following part:<br /><br />server {<br />listen 80;<br />server_name www.brackishmedia.com brackishmedia.com;<br /><br />#charset koi8-r;<br /><br />#access_log logs/host.access.log main;<br /><br />location / {<br />root /usr/share/nginx/brackishmedia.com/html;<br />index index.html index.htm index.php;<br />}<br /><br />#error_page 404 /404.html;<br /><br /><br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/html;<br />}<br /><br />location ~ \.php$ {<br />fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;<br />fastcgi_index index.php;<br />root /usr/share/nginx/brackishmedia.com/html;<br />include fastcgi.conf;<br />}<br /><br />location ~ /\.ht {<br />deny all;<br />}<br />}<br /><br />include /usr/share/nginx/rescuechurchmiami.com/conf/*;<br /><br />and do a `sudo systemctl restart nginx`, it works perfectly. However, I need those that other server block in there and that `include /usr/share/nginx/rescuechurchmiami.com/conf/*;` goes to a configuration file that is specifically for a WordPress install.<br /><br />So these are the issues I am having. Any suggestions on fixing it? I don't even understand why it won't just work like it did on the former VPS anyway.<br /><br />Thank you,<br />AJ]]></description>
<dc:creator>ajcr</dc:creator>
<category>How to...</category><pubDate>Fri, 24 May 2013 04:09:47 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239489,239489#msg-239489</guid>
<title>nginx conf access rule blocking certain url's (1 reply)</title><link>http://forum.nginx.org/read.php?11,239489,239489#msg-239489</link><description><![CDATA[We have url's like this: /demand/change_db_value/18050/13/.80/0/cost<br /><br />Notice the /.80<br /><br />In our nginx conf for our site we have this access rule: location ~ /\.ht { deny all; log_not_found off; access_log off; }<br /><br />This rule produces this error in the logs: error.log: access forbidden by rule, server: oursite.tld, request: &quot;GET /demand/change_db_value/18050/13/.80/0/cost HTTP/1.1&quot;<br /><br />We want to of course block access to any .htaccess files or files beginning with &quot;.&quot;, but how do we make an exception for this particular url structure?]]></description>
<dc:creator>usazelf</dc:creator>
<category>How to...</category><pubDate>Fri, 24 May 2013 04:07:38 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239429,239429#msg-239429</guid>
<title>proxy_redirect based on path (2 replies)</title><link>http://forum.nginx.org/read.php?11,239429,239429#msg-239429</link><description><![CDATA[Hi,<br /><br />I have a Nginx as a reverse proxy for my Java application. The Nginx is configured with SSL to communicate with the outside and talk plain http with my Java application. This means that the redirects needs to be rewritten by Nginx in order to prevent the Location header to start with http://.<br /><br />However, there is one redirect (that redirects users to an identity provider on Internet) where I do not wish to rewrite the Location header at all. And in some way, I can't make this work. The idp is an idp to use in dev-mode and thus the call is not encrypted.<br /><br />I need some guidance in how to configure Nginx to support the scenario described above. My current configuration looks like:<br /><br />server {<br />...<br />location / {<br />proxy_pass http://127.0.0.1:8080;<br />proxy_set_header Host $host;<br />proxy_redirect http:// https://;<br />}<br />}<br /><br />The url http://127.0.0.1:8080/oauth/authorize responds with a 302 Location https://external-idp.com but I want it to be http://external-idp.com. In my Java application the logs clearly says that &quot;Redirecting to http://external-idp.com&quot; so Nginx rewrites this header to https:// which is expected due to my configuration but what changes is needed to make the proxy_redirect not applicable on all paths?<br /><br />/Marcus]]></description>
<dc:creator>marcuskrantz</dc:creator>
<category>How to...</category><pubDate>Wed, 22 May 2013 11:26:08 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239423,239423#msg-239423</guid>
<title>Help, there are a lot of &quot;110: Connection timed out&quot; and &quot;104: Connection reset by peer&quot; errors in my error.log (no replies)</title><link>http://forum.nginx.org/read.php?11,239423,239423#msg-239423</link><description><![CDATA[Hi, I'm new to nginx. I am using nginx as a reverse proxy to access the tomcat. visiting by 1100 concurrent threads, the nginx can't run correctly. there are a lot of &quot;110: Connection timed out&quot; and &quot;104: Connection reset by peer&quot; errors in my error.log，more details is as follows：<br />2013/05/22 13:00:54 [error] 5238#0: *236951627 connect() failed (110: Connection timed out) while connecting to upstream, client: 192.168.0.72, server: testopenfire.fdautotest.com, request: &quot;GET /login.jsp HTTP/1.1&quot;, upstream: &quot;http://192.168.1.46:9090/login.jsp&quot;, host: &quot;testopenfire.fdautotest.com&quot;<br />2013/05/22 13:05:45 [error] 5236#0: *237448096 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.0.72, server: test201.fdautotest.com, request: &quot;GET /botAssist/ HTTP/1.1&quot;, upstream: &quot;http://192.168.4.201:8081/botAssist/&quot;, host: &quot;test201.fdautotest.com&quot;<br /><br />nginx.conf:<br />#user nobody;<br />worker_processes 8;<br />worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;<br />#error_log logs/error.log;<br />#error_log logs/error.log notice;<br />#error_log logs/error.log info;<br />#pid logs/nginx.pid;<br />worker_rlimit_nofile 65535;<br />events {<br />use epoll;<br />worker_connections 65535;<br />}<br />http {<br />include mime.types;<br />default_type application/octet-stream;<br />server_names_hash_bucket_size 128;<br />client_header_buffer_size 4k;<br />large_client_header_buffers 4 16k;<br />client_max_body_size 300m;<br />open_file_cache max=65535 inactive=60s;<br />open_file_cache_min_uses 1;<br />open_file_cache_valid 30s;<br />tcp_nodelay on;<br />tcp_nopush on;<br />proxy_connect_timeout 500;<br />proxy_read_timeout 500;<br />proxy_send_timeout 500;<br />proxy_buffer_size 64k;<br />proxy_buffers 4 32k;<br />proxy_busy_buffers_size 64k;<br />proxy_temp_file_write_size 64k;<br />proxy_set_header Host $host;<br />proxy_set_header X-Real-IP $remote_addr;<br />proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />proxy_set_header X-Forwarded-Proto $scheme;<br />#log_format main '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '<br /># '$status $body_bytes_sent &quot;$http_referer&quot; '<br /># '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';<br />#access_log logs/access.log main;<br />sendfile on;<br />keepalive_timeout 120;<br />include serverconfs/*;<br />server {<br />listen 80;<br />server_name localhost;<br />location / {<br />#root html;<br />#index ip.html index.html index.htm;<br />proxy_pass http://192.168.7.118:8083/;<br />}<br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root html;<br />}<br />}<br />}<br /><br />serverconfs/test201.fdautotest.com(other included files are similar to test201.fdautotest.com):<br />server {<br />listen 80;<br />server_name test201.fdautotest.com;<br />location /botAssist/ {<br />proxy_pass http://192.168.4.201:8081/botAssist/;<br />}<br />location / {<br />proxy_pass http://192.168.4.201:8081/;<br />}<br />location /admin {<br />return 404;<br />}<br />location /manager/html {<br />return 404;<br />}<br />}<br /><br />/etc/sysctl.conf:<br /># Kernel sysctl configuration file for Red Hat Linux<br />#<br /># For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and<br /># sysctl.conf(5) for more details.<br />net.ipv4.conf.eth0.arp_ignore=1<br />net.ipv4.conf.eth0.arp_announce=1<br />kernel.sysrq = 0<br />kernel.core_uses_pid = 1<br />kernel.msgmnb = 65536<br />kernel.msgmax = 65536<br />kernel.shmmax = 68719476736<br />kernel.shmall = 4294967296<br />net.core.wmem_default = 8388608<br />net.core.rmem_default = 8388608<br />net.core.rmem_max = 16777216<br />net.core.wmem_max = 16777216<br />net.core.netdev_max_backlog = 262144<br />net.core.somaxconn = 262144<br />net.ipv4.ip_forward = 0<br />net.ipv4.conf.default.rp_filter = 1<br />net.ipv4.conf.default.accept_source_route = 0<br />net.ipv4.tcp_max_tw_buckets = 60000<br />net.ipv4.tcp_sack = 1<br />net.ipv4.tcp_window_scaling = 1<br />net.ipv4.tcp_rmem = 4096 87380 4194304<br />net.ipv4.tcp_wmem = 4096 16384 4194304<br />net.ipv4.tcp_max_orphans = 3276800<br />net.ipv4.tcp_max_syn_backlog = 262144<br />net.ipv4.tcp_timestamps = 0<br />net.ipv4.tcp_synack_retries = 1<br />net.ipv4.tcp_syn_retries = 1<br />net.ipv4.tcp_tw_recycle = 1<br />net.ipv4.tcp_tw_reuse = 1<br />net.ipv4.tcp_syncookies = 1<br />net.ipv4.tcp_mem = 94500000 915000000 927000000<br />net.ipv4.tcp_fin_timeout = 30<br />net.ipv4.tcp_keepalive_time = 30<br />net.ipv4.ip_local_port_range = 1024 65000<br />net.nf_conntrack_max = 655360<br />net.netfilter.nf_conntrack_tcp_timeout_established = 1200<br /><br />Do you have any solutions?]]></description>
<dc:creator>pan</dc:creator>
<category>How to...</category><pubDate>Wed, 22 May 2013 05:33:58 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239364,239364#msg-239364</guid>
<title>Can't get phpmyadmin to work with nginx on Arch :( (1 reply)</title><link>http://forum.nginx.org/read.php?11,239364,239364#msg-239364</link><description><![CDATA[I am new to nginx. I have always used apache. So maybe I don't know enough about nginx to make this work. I am no newbie to arch though.<br /><br />I have tried EVERYTHING. Also I have thoroughly searched the forum and google and no, none of the solutions worked. I have a VPS with DigitalOcean (great provider, btw) and I have mariadb, nginx, and php-fpm running perfectly. Everything works. However, I can't get phpmyadmin to work. I have followed the wiki ([url]https://wiki.archlinux.org/index.php/PhpMyAdmin#Nginx_Configuration[/url]) and it still doesn't work. I keep getting a 403 error. I would provide you with a domain name but I haven't tied one to the VPS yet. Here is the IP address: [url]http://198.199.86.65/phpmyadmin/[/url]<br /><br />My root directory is /usr/share/nginx/html and if I run an ls /usr/share/nginx/html command I get the following back:<br />index.html phpmyadmin<br /><br />the directory is obviously there.<br /><br />My nginx.conf file reads as such:<br />`<br />#user html;<br />worker_processes 1;<br /><br />#error_log logs/error.log;<br />#error_log logs/error.log notice;<br />#error_log logs/error.log info;<br /><br />#pid logs/nginx.pid;<br /><br /><br />events {<br />worker_connections 1024;<br />}<br /><br /><br />http {<br />include mime.types;<br />default_type application/octet-stream;<br /><br />#log_format main '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '<br /># '$status $body_bytes_sent &quot;$http_referer&quot; '<br /># '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';<br /><br />#access_log logs/access.log main;<br /><br />sendfile on;<br />#tcp_nopush on;<br /><br />#keepalive_timeout 0;<br />keepalive_timeout 65;<br /><br />gzip on;<br /><br />server {<br />listen 80;<br />server_name localhost;<br /><br />#charset koi8-r;<br /><br />#access_log logs/host.access.log main;<br /><br />location / {<br />root /usr/share/nginx/html;<br />index index.html index.htm;<br />}<br /><br />#error_page 404 /404.html;<br /><br /># redirect server error pages to the static page /50x.html<br />#<br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/html;<br />}<br /><br /># proxy the PHP scripts to Apache listening on 127.0.0.1:80<br />#<br />location ~ \.php$ {<br />fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;<br />fastcgi_index index.php;<br />root /usr/share/nginx/html;<br />include fastcgi.conf;<br />}<br /><br /><br /># pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<br />#<br />#location ~ \.php$ {<br /># root html;<br /># fastcgi_pass 127.0.0.1:9000;<br /># fastcgi_index index.php;<br /># fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;<br /># include fastcgi_params;<br />#}<br /><br /># deny access to .htaccess files, if Apache's document root<br /># concurs with nginx's one<br />#<br />#location ~ /\.ht {<br /># deny all;<br />#}<br />}<br /><br />server {<br />listen 80;<br />server_name localhost;<br /><br />root /usr/share/nginx/html/phpmyadmin;<br />index index.php;<br />fastcgi_index index.php;<br /><br />location ~ \.php$ {<br />include /etc/nginx/fastcgi.conf;<br />fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/phpmyadmin$fastcgi_script_name;<br />fastcgi_pass unix:/var/run/php5-fpm.sock;<br />}<br /><br /><br />}<br /><br /># another virtual host using mix of IP-, name-, and port-based configuration<br />#<br />#server {<br /># listen 8000;<br /># listen somename:8080;<br /># server_name somename alias another.alias;<br /><br /># location / {<br /># root html;<br /># index index.html index.htm;<br /># }<br />#}<br /><br /><br /># HTTPS server<br />#<br />#server {<br /># listen 443;<br /># server_name localhost;<br /><br /># ssl on;<br /># ssl_certificate cert.pem;<br /># ssl_certificate_key cert.key;<br /><br /># ssl_session_timeout 5m;<br /><br /># ssl_protocols SSLv2 SSLv3 TLSv1;<br /># ssl_ciphers HIGH:!aNULL:!MD5;<br /># ssl_prefer_server_ciphers on;<br /><br /># location / {<br /># root html;<br /># index index.html index.htm;<br /># }<br />#}<br /><br />}<br />`<br /><br />Any help would be greatly appreciated.]]></description>
<dc:creator>ajcr</dc:creator>
<category>How to...</category><pubDate>Mon, 20 May 2013 21:57:02 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239321,239321#msg-239321</guid>
<title>Question :disable port 443 for non listed virtual hosts. (2 replies)</title><link>http://forum.nginx.org/read.php?11,239321,239321#msg-239321</link><description><![CDATA[Hello there.<br />I use nginx 1.4.1 from 1-2 weeks and i'm realy happy with it. I have the following question.<br />I have configured 4 virtual hosts (servers).<br /><br />First is default_server which is for all non-configured domains (sub-domains) that are configured with my DNS server (A records).<br />Second one is my main website with ports 80 and 443. other two are one with both ports ssl and non-ssl and last one is only port 80.<br />My question is : how i can disable port 443 for virtual hosts that use only port 80. by the now if i type it's domain with https:// it redirects me to my main site and i want to stop that somehow.<br /><br />So is it possible to be done.<br /><br />Kind regards.]]></description>
<dc:creator>icnseo</dc:creator>
<category>How to...</category><pubDate>Tue, 21 May 2013 05:44:24 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239303,239303#msg-239303</guid>
<title>Nginx location directive to transform url into a query string (no replies)</title><link>http://forum.nginx.org/read.php?11,239303,239303#msg-239303</link><description><![CDATA[I need to show the user information using the link type:<br /><br />http://mydomain.com/username/<br /><br />within the system of query should look like:<br /><br />http://mydomain.com/users/?username=username<br /><br />Q: How to convert (handle) queries like: mydomain.com/username ?]]></description>
<dc:creator>Sergey Kozlov</dc:creator>
<category>How to...</category><pubDate>Fri, 17 May 2013 16:26:58 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239302,239302#msg-239302</guid>
<title>404 Not Found error in deploying rails 3.2.12 app (with engines) to SUB URI on nginx/passenger (no replies)</title><link>http://forum.nginx.org/read.php?11,239302,239302#msg-239302</link><description><![CDATA[We need to deploy a rails 3.2.12 app to sub uri nbhy on a ubuntu 12.04 server. The rails app has 3 engines and one of them is authentify which is for user authentication. The main app's root pointing to authentify's signin page. Here is the routes.rb in main app:<br /><br />root :to =&gt; &quot;authentify::sessions#new&quot;<br />match '/signin', :to =&gt; 'authentify::sessions#new'<br />match '/signout', :to =&gt; 'authentify::sessions#destroy'<br />match '/user_menus', :to =&gt; 'user_menus#index'<br />match '/view_handler', :to =&gt; 'authentify::application#view_handler'<br /><br />The app is deployed to base uri nbhy running on ubuntu 12.04 with passenger and nginx. On the same server, there is another rails app running in its own sub uri. Here is the configuration in nginx.conf for sub uri nbhy:<br /><br />server {<br />listen 80;<br />server_name 6.95.225.93;<br />root /var/www/;<br />passenger_enabled on;<br />rails_env production;<br />passenger_base_uri /by;<br />passenger_base_uri /nbhy;<br /><br />#for rails &gt;=3.1, assets pipeline<br />location ~ ^/assets/ {<br />expires max;<br />add_header Cache-Control public;<br />add_header ETag &quot;&quot;;<br />break;<br />}<br />}<br /><br />Also a symlink nbhy is created at document root /var/www pointing to /var/www/nbhyop/current/public. Here is the output of the root /var/www/:<br /><br />total 8<br />lrwxrwxrwx 1 cjadmin www-data 28 Nov 3 2012 by -&gt; /var/www/byop/current/public<br />drwxrwsr-x 4 cjadmin www-data 4096 Nov 4 2012 byop<br />lrwxrwxrwx 1 cjadmin www-data 30 May 16 21:27 nbhy -&gt; /var/www/nbhyop/current/public<br />drwxrwsr-x 4 cjadmin www-data 4096 May 14 15:21 nbhyop<br /><br />The by is the first rails app deployed to the sub URI and is working fine.<br /><br />The login page is displayed after typing http://6.95.225.93/nbhy. After key in user and password, the page was redirected to http://6.95.225.93/authentify/session with 404 Not Found error. There is an error found in nginx error.log:<br /><br />2013/05/13 16:29:25 [error] 2384#0: *1 open() &quot;/var/www/authentify/session&quot; failed (2: No such file or directory), client: 192.168.1.1, server: 6.95.225.93, request: &quot;POST /authentify/session HTTP/1.1&quot;, host: &quot;6.95.225.93&quot;, referrer: &quot;http://6.95.225.93/nbhy/&quot;<br /><br />Obviously /var/www/authentify/session will not hit the right page because it is missing the base uri nbhy between www and authentify. Based on our analysis, the create in authentify session controller hasn't been hit and the user hasn't been authenticated even with the right user name and password at http://6.95.225.93/nbhy.<br /><br />Also find out that a user can login at http://6.95.225.93/nbhy/authentify/session/new with some twist. After login the page will be redirected to http://6.95.225.93/user_menus which will throw out 404 Not Found error. However if we insert nbhy in between as : http://6.95.225.93/nbhy/user_menus, then it will bring up the user menus page successfully. For any further click on links, manually inserting nbhy will make the link work (if nbhy is missing).<br /><br />The rails app worked fine when deploying without sub uri.<br /><br />Why the sub uri is missing from route? Is there a way we can make the nbhy here to stay and eliminate the error? Thanks for help.]]></description>
<dc:creator>emclab</dc:creator>
<category>How to...</category><pubDate>Fri, 17 May 2013 14:18:37 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239293,239293#msg-239293</guid>
<title>Load balancer deployed on same two servers as application (no replies)</title><link>http://forum.nginx.org/read.php?11,239293,239293#msg-239293</link><description><![CDATA[If I want to load balance / provide HA to two Tomcat servers using nginx then this is obviously possible top do via a 3rd server acting as a go-between (fig 1). But can I do away with this 3rd server and have nginx deployed on the same two servers as Tomcat and remove my single point of failure (as per fig 2)?<br /><br />Many thanks.]]></description>
<dc:creator>really_there</dc:creator>
<category>How to...</category><pubDate>Fri, 17 May 2013 08:53:03 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239291,239291#msg-239291</guid>
<title>Preserve http headers from Django using NGINX and Gunicorn (no replies)</title><link>http://forum.nginx.org/read.php?11,239291,239291#msg-239291</link><description><![CDATA[Hi,<br /><br />I posted a question on server fault on how to preserve the headers I set in the Django backend.<br />It seems as nginx &quot;removes&quot; the headers I have set in a Django middleware.<br /><br />I described my problem in detail here:<br /><br />http://serverfault.com/questions/508524/preserve-http-headers-from-django-using-nginx-and-gunicorn<br /><br /><br />Hope to get some help here. Thanks in advance!<br />Thomas]]></description>
<dc:creator>tomtom</dc:creator>
<category>How to...</category><pubDate>Fri, 17 May 2013 07:57:10 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239246,239246#msg-239246</guid>
<title>Microsoft RPC over HTTPS (no replies)</title><link>http://forum.nginx.org/read.php?11,239246,239246#msg-239246</link><description><![CDATA[I'm struggling with the above with nginx as reverse proxy. I can see RPC_IN_DATA and RPC_OUT_DATA methods crossing the proxy, but get 503 served after a short time.<br /><br />Config extracts:<br /><br />gzip off;<br />tcp_nodelay on;<br />...<br />server {<br />listen 443;<br />location / {<br />proxy_buffering off;<br />proxy_pass http://backend-server:443;<br />}]]></description>
<dc:creator>u848237</dc:creator>
<category>How to...</category><pubDate>Wed, 15 May 2013 12:29:11 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239231,239231#msg-239231</guid>
<title>Nginx as reverse proxy - must point to different web servers (4 replies)</title><link>http://forum.nginx.org/read.php?11,239231,239231#msg-239231</link><description><![CDATA[Hello,<br /><br />i'm a newbie on Nginx and i have this problem :<br /><br />We have Nginx as reverseproxy who point on a Java server (Platform play) - That's ok and work well :<br /><br />https://www.toto.fr<br /><br />Now we would like to point to our Nagios server when we enter this URL https://www.toto.fr/supervision/<br /><br />For this, i have this block :<br /><br />location /supervision {<br />proxy_pass http://IP_SERVER_NAGIOS/nagios/;<br />proxy_redirect off;<br />proxy_set_header Host $host;<br />proxy_set_header X-Real-IP $remote_addr;<br />proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />proxy_set_header X-Forwarded-Ssl on;<br />access_log /var/log/nginx/supervision.access.log;<br />}<br /><br />That's work too ! I access well on the start page of Nagios. But when i click on another link of Nagios web interface, Nginx doesn't find the pages because the links point to http://www.toto.fr/nagios/cgi-bin/.... and not to http://www.toto.fr/supervision/cgi-bin/...<br /><br />What is the way to resolve this problem ? an 'if' condition, a rewrite URL, a new location block ? Can you help me please ?<br /><br />Thanks<br /><br />Doctau]]></description>
<dc:creator>doctau</dc:creator>
<category>How to...</category><pubDate>Wed, 15 May 2013 12:11:06 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239227,239227#msg-239227</guid>
<title>Проверка на вхождение. (no replies)</title><link>http://forum.nginx.org/read.php?11,239227,239227#msg-239227</link><description><![CDATA[Добрый день.<br /><br />Существует необходимость проверить на входжение некоторую системную переменную:<br /><br />root /www/public_html;<br /><br />include /etc/nginx/fastcgi_params;<br />fastcgi_pass fpm_server;<br />fastcgi_index index.php;<br />fastcgi_param SCRIPT_FILENAME //index.php;<br />fastcgi_param SCRIPT_NAME '';<br />fastcgi_param QUERY_STRING $args;<br />fastcgi_param PATH_INFO $uri;<br /><br />#set $fake_ip 111.222.333.444;<br /><br />fastcgi_param HTTP_X_REAL_IP $remote_addr;<br /><br />if ($remote_addr = 192.168.*) {<br />fastcgi_param HTTP_X_FORWARDED_FOR $remote_addr;<br />}<br /><br />Однако использовать как я понимаю fastcgi_param внутри if-а нельзя. Как же быть в данном случае, в котором мне надо проверить, что $remote_addr равно 192.168.*, а остальные должны быть отвергнуты и X-Forwarder-For должен остаться пустым.<br /><br />Заранее благодарен!]]></description>
<dc:creator>plushka</dc:creator>
<category>How to...</category><pubDate>Wed, 15 May 2013 08:21:13 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239226,239226#msg-239226</guid>
<title>Noob question - Root vs Alias and image_filter (1 reply)</title><link>http://forum.nginx.org/read.php?11,239226,239226#msg-239226</link><description><![CDATA[Hi,<br /><br />I'm starting with nginx, and I have some problems with resize of pictures. And when I'm trying my conf, I see I did not realy undersand some basic concepts.<br /><br />My first problem :<br />I have a url like this : http://localhost/media/test/titi/toto.jpg<br />And it works good with this configuration :<br />location ~ /media/test/(.*) {<br />alias /var/www/html/toto/$1;<br />}<br /><br />But it doen't work with this config.<br />location ~ /media/test/(.*) {<br />root /var/www/html/toto;<br />}<br />I don't understand why ?<br /><br />My second problem is about resize. Why did it not work ?<br /><br />location ~ /media/test/(.*) {<br />image_filter resize 50 10;<br />alias /var/www/html/toto/$1;<br />}<br /><br />Thanks for your help.<br /><br /><br />Eric]]></description>
<dc:creator>elhostis</dc:creator>
<category>How to...</category><pubDate>Wed, 15 May 2013 10:24:45 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239201,239201#msg-239201</guid>
<title>redirect all unconfigured subdomains (1 reply)</title><link>http://forum.nginx.org/read.php?11,239201,239201#msg-239201</link><description><![CDATA[Hi all,<br />I'm happy to join NGINX community and want to share with you with my little problem.<br /><br />I've got wildcard entry for example.com in my DNS which points all subdomains to some machine<br />* IN A 172.172.172.172<br />While NGINX configuration for this domain contains only actively used subdomain names<br />server {<br />listen 10.0.0.1:80;<br />server_name example.com www.example.com<br />moskva.example.com www.moskva.example.com<br />tokyo.example.com www.tokyo.example.com<br />...<br />}<br />What I want to achieve is directing all unconfigured subdomains like 'mistake.example.com' to specific address.<br />Is there any elegant way of solving this problem?<br /><br />Best Regards<br />Arek]]></description>
<dc:creator>vonHerman</dc:creator>
<category>How to...</category><pubDate>Wed, 15 May 2013 12:05:47 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239197,239197#msg-239197</guid>
<title>nginx second site configuration (4 replies)</title><link>http://forum.nginx.org/read.php?11,239197,239197#msg-239197</link><description><![CDATA[Please help me!!!!!!!!! I am trying to setup a second site using nginx but looks like all requests are going to the same place. I mean to this site here &quot;institutoprana.com.br&quot;<br /><br />If you type in www.agencialojavirtual.br it goes to www.institutoprana.com.br.<br /><br />What can I do to make the appropriate requests to go correctly to each domain?<br /><br />server {<br />listen 80;<br /><br /><br />root /var/www/prana;<br />index index.php index.html index.htm;<br /><br />server_name institutoprana.com.br;<br /><br />location / {<br />try_files $uri $uri/ /index.php?q=$uri&amp;$args;<br />}<br /><br />error_page 404 /404.html;<br /><br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/www;<br />}<br /><br /># pass the PHP scripts to FastCGI server listening on 127.0.0.1:9$<br />location ~ \.php$ {<br />#fastcgi_pass 127.0.0.1:9000;<br /># With php5-fpm:<br />fastcgi_pass unix:/var/run/php5-fpm.sock;<br />fastcgi_index index.php;<br />include fastcgi_params;<br />}<br /><br />location /phpmyadmin {<br />root /usr/share/;<br />index index.php index.html index.htm;<br />location ~ ^/phpmyadmin/(.+\.php)$ {<br />try_files $uri =404;<br />root /usr/share/;<br />#fastcgi_pass 127.0.0.1:9000;<br />fastcgi_pass unix:/var/run/php5-fpm.sock;<br />fastcgi_index index.php;<br />fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br />#include /etc/nginx/fastcgi_params;<br />include fastcgi_params;<br />}<br />location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {<br />root /usr/share/;<br />}<br />}<br />location /phpMyAdmin {<br />rewrite ^/* /phpmyadmin last;<br />}<br />}<br /><br />server {<br />listen 80;<br />root /var/www/retiroaybrasilia;<br />index index.php index.html index.htm;<br />server_name agencialojavirtual.com.br;<br />location / {<br />try_files $uri $uri/ /index.php?q=$uri&amp;$args;<br />}<br /><br /><br />Thank you]]></description>
<dc:creator>rodusa</dc:creator>
<category>How to...</category><pubDate>Wed, 15 May 2013 08:42:15 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239164,239164#msg-239164</guid>
<title>cache a request conditionally based on cookies? (no replies)</title><link>http://forum.nginx.org/read.php?11,239164,239164#msg-239164</link><description><![CDATA[Hi,<br /><br />Using NginX as a reverse proxy, I want to cache the response ONLY if the user has NOT logged in, which can be checked by testing the existence of a cookie.<br /><br />First I tried to use &quot;if&quot;, but NginX complained that I cannot put a proxy_cache_valid inside an &quot;if&quot;:<br /><br />location / {<br />proxy_pass http://www.xyz.com;<br />if ($cookie_login = '') {<br />proxy_cache my-cache;<br />proxy_cache_valid 200 301 302 60m;<br />}<br />}<br /><br /><br />Then I tried to set the cache-duration to 0s by using a variable, but then NginX complained the time value is incorrect.<br />set $cacheDuration 60m;<br />if ($cookie_login != '') {<br />set $cacheDuration 0s;<br />}<br /><br />proxy_cache my-cache;<br />proxy_cache_valid 200 301 302 $cacheDuration<br /><br /><br />So is there a way to cache conditionally based on the existence of a cookie?<br /><br /><br />Thanks.<br /><br />- Patrick]]></description>
<dc:creator>patng323</dc:creator>
<category>How to...</category><pubDate>Tue, 14 May 2013 03:42:32 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239163,239163#msg-239163</guid>
<title>Nginx proxy to dmserver чего ждет? (no replies)</title><link>http://forum.nginx.org/read.php?11,239163,239163#msg-239163</link><description><![CDATA[День добрый, CentOS6.2 + nginx/1.2.6 проксирует на dmserver , время обработки запроса без Nginx составляет 0.010~0.015 мс, а вот когда в качестве прокси время обработки запроса увеличивается до 0.067~0.072 мс, для чего проксируем? чтоб не заморачиватся с сертификатами на dmservere и оперативно обновлять.<br />location / {<br /><br />proxy_pass https://$upbackend;<br />proxy_set_header Host $host;<br />proxy_set_header X-Real-IP $remote_addr;<br />proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />proxy_cache off;<br />#proxy_buffers 5 2k;<br />#proxy_buffer_size 2k;<br />#proxy_buffering on;<br />}<br />включение и изменение значений приводит лиш к увеличению времени.<br />Подскажите что можно включить (отключить) для уменьшения времени обработки. Сами понимаете 0.05мс чего-то ожидать.. весьма неожиданно для меня.<br />Заранее благодарен!]]></description>
<dc:creator>imroot</dc:creator>
<category>How to...</category><pubDate>Tue, 14 May 2013 02:56:12 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239153,239153#msg-239153</guid>
<title>nginx server unix socket (no replies)</title><link>http://forum.nginx.org/read.php?11,239153,239153#msg-239153</link><description><![CDATA[Hi,<br /><br />I have a network camera and I am using nginx as a reverse proxy to access the camera URL, but I do not want people to be able to access the url directly. I want to include the feed in a site.<br /><br />So I configured nginx as a reverse proxy using a unix socket:<br />upstream apm02_unix {<br />server unix:/tmp/motion_apm02: fail_timeout=0;<br />}<br /><br />I chose to use the unix socket in order to protect the feed.<br /><br />Is it possiable for nginx to server this feed via the reverse proxy unix socket?<br /><br />Regards<br />Gregg]]></description>
<dc:creator>douglagm</dc:creator>
<category>How to...</category><pubDate>Mon, 13 May 2013 13:00:48 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239071,239071#msg-239071</guid>
<title>allowing specific http locations for https only back-end (no replies)</title><link>http://forum.nginx.org/read.php?11,239071,239071#msg-239071</link><description><![CDATA[i have a back-end server which is setup for https only.<br /><br />there are a handful of specific urls that i would like to make available to non-ssl clients via nginx front.<br /><br />i tried a couple of things but i can't seem to get it to work correctly.<br /><br />is this possible? if so, can anyone suggest the appropriate config syntax?<br /><br />any guidance appreciated!]]></description>
<dc:creator>tony_k</dc:creator>
<category>How to...</category><pubDate>Fri, 10 May 2013 21:28:42 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239067,239067#msg-239067</guid>
<title>Reverse proxy host (dns proxy?) (1 reply)</title><link>http://forum.nginx.org/read.php?11,239067,239067#msg-239067</link><description><![CDATA[does anyone has an idea how configure nginx as reverse proxy host like x4b.org does ? maybe via dns or ? for multiple sites.]]></description>
<dc:creator>x0b</dc:creator>
<category>How to...</category><pubDate>Tue, 14 May 2013 05:31:26 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239045,239045#msg-239045</guid>
<title>how to disable resume capability (1 reply)</title><link>http://forum.nginx.org/read.php?11,239045,239045#msg-239045</link><description><![CDATA[Hello Everyone<br />I just moved in nginx and somehow I'm newbe...<br />I am using my server as a download server. and i need to know how can i disable resume capability for my users in one virtualhost?<br />I already limit the connections to one per user. but it's not good enough. Tnx]]></description>
<dc:creator>nimait70</dc:creator>
<category>How to...</category><pubDate>Tue, 14 May 2013 18:37:52 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239020,239020#msg-239020</guid>
<title>questions about $args on try_files inside location with regex (1 reply)</title><link>http://forum.nginx.org/read.php?11,239020,239020#msg-239020</link><description><![CDATA[hi! (sorry for my bad english)<br /><br />i have a URL like this:<br /><br />http://www.domain.com/resize.php?pic=images/elements/imagename.jpg&amp;type=300crop<br /><br />that php checks if that image exists and serves, if not, creates image on disk with the size specified in the type parameter and returns it.<br /><br />what I wanted is to check if the image exists on disk at that size, with nginx, so run only resize.php when necessary to create the image.<br /><br />I tried this, but i think that location directive doesn't operate on query parameters ($args) using regex, then loncation does not match with sample URL :(<br /><br />any help please?<br /><br />I need to rewrite the parameters ($args) and use them in the try_files directive... is this possible?<br /><br />-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*<br /><br />&gt; location ~ &quot;^/resize\.php\?pic=images/(elements|gallery)/(.*)\.jpg&amp;type=([0-9]{1,3}[a-z]{0,4})$)&quot;{<br />&gt; try_files /images/$1/$2.jpg /imagenes/elements/thumbs/$3_$2.jpg @phpresize;<br />&gt; }<br /><br />&gt; location @phpresize {<br />&gt; try_files $uri =404;<br />&gt; proxy_set_header Host $host;<br />&gt; proxy_set_header X-Real-IP $remote_addr;<br />&gt; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />&gt; proxy_buffering on;<br />&gt; proxy_pass http://127.0.0.1:8080;<br />&gt; }<br /><br />-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*]]></description>
<dc:creator>pepejose</dc:creator>
<category>How to...</category><pubDate>Sat, 11 May 2013 05:32:20 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,238925,238925#msg-238925</guid>
<title>How to run multiple projects in NGINX? (no replies)</title><link>http://forum.nginx.org/read.php?11,238925,238925#msg-238925</link><description><![CDATA[I am relatively new to NGINX. I was used to using packages like xampp for all my web projects. I installed NGINX, PHP and MariaDB on my local computer and I would like to know how do i run multiple projects using the project?<br />I understand that in the &quot;nginx.conf&quot; file you have to specify the root directiry of your projects? Do I have to do it everytime in every project? Unlike xampp, there's a htdocs folder wher you have to create your projects and just run localhost on the web browser and every folders you have been working on will be displayed there.<br /><br />Need assistance.]]></description>
<dc:creator>jhoiemarie</dc:creator>
<category>How to...</category><pubDate>Mon, 06 May 2013 18:11:09 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,238924,238924#msg-238924</guid>
<title>Conflicting apt-get apache issues (no replies)</title><link>http://forum.nginx.org/read.php?11,238924,238924#msg-238924</link><description><![CDATA[Installed a fresh debian minimal x64 recently, want it to run php-fpm and nginx, and nothing related to apache*.<br /><br />The weirdest thing however is that apt-get seems to ignore my wishes and keeps dumping apache warez on the server, whatever I do, I end up in catch-22 situations when I try to remove apache, like apt saying:<br /><br />The following packages were automatically installed and are no longer required:<br />libapr1 libaprutil1-ldap locales nginx-common libaprutil1-dbd-sqlite3 geoip-database libgeoip1<br />liblua5.1-0 libaprutil1 libossp-uuid16 libgd2-noxpm<br />Use 'apt-get autoremove' to remove them.<br />The following packages will be REMOVED:<br />apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common phpsysinfo squirrelmail<br />squirrelmail-locales squirrelmail-viewashtml<br />0 upgraded, 0 newly installed, 8 to remove and 0 not upgraded.<br />After this operation, 23.1 MB disk space will be freed.<br />Do you want to continue [Y/n]? n<br />Abort.<br /><br />Of course I don't want to remove anything nginx related, when I just want to kill and purge apache off my server!<br />So why is it doing this?<br /><br />Another thing is why it wants to remove squirrelmail and phpsysinfo, as if those don't function with nginx? They do just fine thank you very much.<br /><br />In addition, it keeps re-installing apache2 whenever I try to remove nginx in order to be able to do a clean re-install! It assumes I want apache as a replacement whenever I remove nginx (!?). How do I stop it from forcing apache or lighttpd material down my throat?<br /><br />Gosh, sometimes linux, especially debian, makes me want to leave everything IT-related and live on an island.<br />I'll probably end up no longer using dotdeb repos, they only result in messing up my server.]]></description>
<dc:creator>liefde</dc:creator>
<category>How to...</category><pubDate>Mon, 06 May 2013 17:58:17 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,238884,238884#msg-238884</guid>
<title>NGINX error and Wampserver (no replies)</title><link>http://forum.nginx.org/read.php?11,238884,238884#msg-238884</link><description><![CDATA[I am new to NGINX. Do I have to uinstall wampserver first before using NGINX?]]></description>
<dc:creator>jhoiemarie</dc:creator>
<category>How to...</category><pubDate>Sun, 05 May 2013 23:32:11 -0400</pubDate></item>
</channel>
</rss>