Quantcast
Channel: Nginx Forum - How to...
Viewing all 2931 articles
Browse latest View live

php-file not protected (no replies)

$
0
0
Hello

I have a basic authentication inserted to my nginx server config.

location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
auth_basic "Admin Login";
auth_basic_user_file /etc/nginx/pma_pass;

I thought I can't reach any file in my location without an authentication. But I have 2 files in /php sub directory. One is a *.txt file and the other one *.php. The *.txt is protected and the login popup is appearing but not for the *.php-file. It will be deliverd as it is designed for. I would like to have it protected the same way as the *.txt.

Any suggestions?

Kind regards
//neph

Change locally hosted site from "localhost" to "localhost/site" (no replies)

$
0
0
Hi all,

I'm very new to hosting anything so this may have an obvious solution... But this is the first time I've ever touched a webserver, and so far I haven't got it right.

I've installed Moodle locally for testing purposes, and everything is working fine. But I would like to change the address. At the moment, when I navigate in my browser to "localhost" it brings up the moodle front page.

However, I would like to navigate to "localhost/moodle", and do the same for the other CMS/LMS software I want to try E.G. "localhost/edx", "localhost/lifterlms", "localhost/composr", etc.

I've tried changing "server_name", "root" and other stuff, but I can;t get it to behave the way I would like.

I'm running FreeBSD 10.3, nginx 1.10.1

My Moodle is installed in /usr/local/www/moodle

My nginx.conf is attached.

I'm not sure what other information I need to include here.

Any help is greatly appreciated.

Error module ngx_http_auth_pam_module.so after update (no replies)

$
0
0
hello,

I update nginx on debian 8 server from 10.10001 version to 10.10002 with apt and nginx repos.

I get a error message : module "/etc/nginx/modules/ngx_http_auth_pam_module.so" version 1010001 instead of 1010002 in /etc/nginx/modules-enabled/50-mod-http-auth-pam.conf

Could you please help me to fixed it ?

Thanks

Nginx / reverse proxy (no replies)

$
0
0
We have a web application called Calabrio AQM that doesn't work for users outside of our network. AQM is a call recording platform we use in our call center to store recorded calls. There's apparently some limitation within AQM that involves hard-coded URLs which reference whatever IP is assigned to the AQM box. So, even if you NAT the server, at some point you're going to encounter these URLs that reference some internal IP.

I am hoping that by setting up a reverse-proxy, we'll be able to work around this limitation. So far, I've just done a simple test by proxying the default Nginix site installed on my Debian test box via the proxy_pass variable to send any inbound request to the default Nginix site over to the Calabrio AQM web server. It does actually send traffic to the AQM server, the web pages generally seem to render up fine. Certain URLs are not working, though and instead we get the internal IP of the server.

Also, when you access a call recording, the audio does not stream to the client via web browser. You can see the recordings, you can even click play to start playing back the recording and watch the progress needle move, but there's only silence.

I am not exactly sure how the media player embedded in to the AQM web interface works, but my guess is that it's somehow pointing to the internal IP of the server, because that is exactly what you see when you, say, select a recording to export--the URL that displays when you export a call is pointing back to the internal IP of the box.

Hopefully I've made sense here, but please feel free to ask questions for clarification. I was thinking that the URLs need to be re-written somehow but even that seems to be ignored. This problem is driving me nuts!

Thank you for any feedback :)

Can't reach website anymore only "Welcome to nginx!" page comes up (no replies)

$
0
0
I am using Nginx to run my website on Ubuntu 14.04. I just got it setup a few days ago. Everything was working fine until my router ended up changing my IP address on my Ubuntu server last night. I didn't known my server was setup with the DHCP protocol, I thought it was static. When my website wouldn't come up this morning I determined the problem to be the new IP address. I still have a problem though. When I access my server with the new IP address I now get the "Welcome to nginx!" page. My website won't come up anymore. The only thing that changed was the IP address. I have since programmed my router to reserve the new IP address for my server so that it won't change again. I also changed my port forwarding IP on my router to use the new IP address so that when my DNS uses my public IP to locate my router it will be forwarded to my server. The thing that makes no since is that the new IP address just brings up the "Welcome to nginx!" page and not my website. All of my files are still in place and nothing else changed. Does anyone have any idea what happened?

Thanks in advance for any advice

Disable redirect to https (no replies)

$
0
0
My current configuration for `Nginx` is

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

root /usr/share/nginx/html;
index index.html index.html;

server_name url.tdl;


location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://localhost:2368;
}
}

server {
listen 443 ssl;
server_name url.tdl; # Replace with your domain

root /usr/share/nginx/html;
index index.html index.htm;

ssl on;
ssl_certificate /root/url.tdl.chained.crt;
ssl_certificate_key /url.tdl.me.key;

client_max_body_size 10G;

location / {
proxy_pass http://localhost:2368;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
}

In the above configuration file, I have no redirects written, but still the website redirects to HTTPS.

According to http://stackoverflow.com/questions/30072777/nginx-disable-http-to-https-redirect, they have disabled `listen 443` but I want to have the `443` as an option.

Is there any way to keep both options without any redirects?

Configure LDAP Authentication using Nginx and Django with FIR (Fast Incident Response) (no replies)

$
0
0
Hello! Does anyone know how to configure LDAP Authentication using nginx and django? I setup FIR (Fast Incident Response) in a linux server and cannot properly configure LDAP Auth.

Newbie - Can't start nginx (no replies)

$
0
0
Hi,

I used the automated install for nginx+pagespeed module from https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source

From the output I would assume that the install was successfull. Shouldn't it be possible to start nginx by just calling 'nginx'?

I have not added any init scripts yet. I really just wanted to test if it starts and is reachable.

root@test /usr/local/nginx/sbin # nginx
bash: nginx: command not found

but

root@test /usr/local/nginx/sbin # ls -l
total 21076
-rwxr-xr-x 1 root staff 21580784 Oct 28 18:09 nginx

Thanks for any help
Andy

how to take advantage of all CPUs (only 5x php-fpm processes are running)? (2 replies)

$
0
0
Hello all,

I am new to this forum so I hope I post in the right section.

I am trying to set up a good server for Magento2 using nginx 1.10.0 + PHP 7.0.8 (Zend Engine v3.0.0) on Ubuntu 16.04-64bits. I get good response time when browsing pages already cached by varnish but not when browsing pages that haven't been cached yet. So I disabled the cache feature in Magento2 and I made stress tests with http://www.magespeedtest.com (which uses siege, see https://www.joedog.org/siege-home/).

Using the command htop, I realized 5x php-fpm processes were hitting hard on 5x different CPU. But if I install the same configuration on a 32 cores VPS, I still get only 5x processes (thus leaving 27x CPUs unused).

I tried to change "worker_processes 25" instead of "worker_processes auto" in /etc/nginx/nginx.conf but it didn't change anything

How can I take advantage of the 32x CPUs?

Thanks for any help

macsym

newbie : nginx service as non root user (no replies)

$
0
0
Guys,

Sorry for the long write up, but I have a different problem and see if anyone has done this..



I have a compiled nginx from source code as we have a custom install requirement we run http on 1234 port and https on 5678 port, so we don;t need to run our nginx as root at all


cd /opt/install/nginx-1.11.3

./configure --user=appadmin --group=apps_group --prefix=/opt/nginx --sbin-path=/opt/nginx/sbin/nginx --conf-path=/opt/nginx/conf/nginx.conf --error-log-path=/opt/nginx/logs/nginx-error.log --http-log-path=/opt/nginx/logs/nginx-access.log --pid-path=/opt/nginx/run/nginx.pid --lock-path=/opt/nginx/run/nginx.lock --with-http_ssl_module --with-http_gunzip_module --with-http_gzip_static_module --with-pcre=/opt/install/pcre-8.39 --with-http_sub_module --with-http_v2_module --with-ipv6 --with-openssl=/opt/install/openssl-1.0.2j

make

make install

and all went well till this point,

after we login to our individual account, we do "sudo su - appadmin" account

so all our app related components has to run as appadmin account and we do nto use any ports under 1024 ports at all


so now the problem is

We wanted to run nginx when server is restarted after any maintenance., so we picked up init script from https://www.scalescale.com/tips/nginx/nginx-init-script/


I made all my customconfig file changes and when i do

service nginx stop or service nginx start as appadmin this works fine,

however if I do a server reboot master process is owned by root and rest of all worker process are owned by appadmin, trouble here is we are unable to stop the nginx as appadmin, becasue we do not have any sudo to root privilages, is there any other way to fix this ?


SKola

How to have sticky session with least connected (no replies)

$
0
0
Hi All,
I am using ip_hash(Sticky Session) and I have a scenario for our web portal where portal is accessible over web, and we have support module which is also hosted on the same portal, and upstream is having load balanced with 22 nodes

1. No problem for customers using portal for Sticky Session.
2. Users loging in from support center are having performance issue because sticky session is making upstream to point same node for all user's which are haing same external public IP.

Need help regarding point 2.

Thanks

How to host multiple sites locally at different addresses (no replies)

$
0
0
Hi all,

I'm trying to host a few different sites locally, on my laptop, for testing purposes (EG Moodle, Wordpress, Composr CMS, etc.)

I would like to have each website located at "localhost/website" or something similar.

At the moment I have one website (moodle) which I can access by navigating to "localhost" in my browser.

I've read the documentation, and experimented with the nginx config files, but so far, I have not managed to move my moodle installation from "localhost" to "localhost/moodle".

Can anyone please point me in the right direction?

Website index.html file automatically gets overwritten with Nginx default index.html file (no replies)

$
0
0
I'm running Nginx on Ubuntu 14.04. I have my website installed in the default /usr/share/nginx/html directory. My website works fine for several days and then the system automatically overwrites my websites index.html file with the default Nginx "Welcome to nginx!" index.html file. I have to go back and copy my website’s index.html file again in order for my website to work. I've had my website up for a couple of weeks now and this has happened three times. My website will work for a few days and then my index.html file will get overwritten. There is no method to the madness. Does anyone know what might be causing this to happen?

How to rewrite URLs with ( and ) symbols? (no replies)

$
0
0
Hi everyone,

I'm stuck with the problem. I have to rewrite a few URLs that contain ( and ) symbols in it, for ex /category/Blah(blah).html. NGINX doesn't rewrite correctly those URLs because ( ) are used in rewrite regexp.

How can I rewrite those URLs?

Thanks in advance

Nginx not caching when Vary headers not being ignored (no replies)

$
0
0
First off: I don't have much experience with Nginx.

I'll just proceed directly to the problem though:

Nginx config:

user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 2048;
multi_accept on;
}
http {
proxy_cache_path /var/nginx_cache levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=10g;

upstream server {
server -removed-;
}

server {
listen 80;
server_name -removed-;
location / {
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_http_version 1.1;
gzip_min_length 500;
gzip_vary on;
gzip_proxied any;
gzip_types
application/atom+xml
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy
text/js
text/xml
text/javascript;


add_header X-Cache-Status $upstream_cache_status;
proxy_cache STATIC;
proxy_set_header Host $host;

----> proxy_ignore_headers Vary; <-----

proxy_cache_key $host$uri$is_args$args;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_pass -removed-;

}



}
}

When the line 'proxy_ignore_headers Vary;' is set, everything will cache, including the HTML pages. When I remove this line, everything gets cached EXCEPT the HTML pages. Why is this?

I would like that Nginx caches the HTML pages even when Vary-headers are being sent by the origin server.

I hope someone can help me :).

Response Headers are:

Vary:Host, Content-Language, Content-Type, Content-Encoding

Not legacy SEO practice. Someone who has pointed their domain at my ip (web server)? (no replies)

$
0
0
Hello everyone, with regard to the server blocks, Is there anything I can do about someone who has pointed their domain at my ip?.
What Happens: notdesireddomain.com(without content, i check visiting through ip) only redirects to mydomain.com:80 (on server block listen 80 i have a 301 redirect to mydomain:443, locations, etc...)
that redirects to mydomain:443(with content). I guess, this is a not legacy SEO practice.
I try to find a solution through the block server parts in order to the notdesireddomain.com can't access to my domain (even It redirects to this).
Thanks.

Closed connection in SSL handshake (10054: An Existing .... (no replies)

$
0
0
I'm using nginx for the first time so this could be my fault. I'm trying to use nginx as https reverse proxy to connect users to another https site. Both nginx and the redirected site are using the same certificate. Hopefully, that isn't the problem?

Here is what I have done so far and then I'll share the logs.

I first installed nginx on a windows server that has the https site I want customers to connect to. I was using port 443 for nginx and port 8060 for the other https site. I got the SSL handshake error 10054. I also get SSL_do_handshake: -1, SSL_get_error: 2, SSL_get_error: 5 in the debug.

I then tried to seperate the roles on two different servers. I built a CentOS 7 server and configured it and tried to redirect the https to the windows server on port 8060 and got the same error. So then I built another windows server and put nginx on it and tried and of course I got the same error.

I ran a wireshark which I'm not that knowledgable with and saw the client/server communication Hello etc and appeared to be fine when I hitting the nginx server or if I hit the windows server with the second https site. www.domain.com:8060. I get the correct response when hitting them direct, but I never see the redirect traffic. Maybe I don't have wireshark setup correctly?

Here is the whole message I receive: *1 peer closed connection in SSL handshake (10054: An existing connect was forcibly closed by the remote host) while SSL handshaking to upstream, client: "public IP address", server: "nginx public DNS name", request: "Get / HTTP/1.1", upstream: "https://public IP Address of 2nd https site:portnumber/", host: "nginx's public DNS server Name".

I used these commands to create my pem and key files: openssl pkcs12 -nocerts -nodes -in my.domain.com.p12 -out domain.key
and openssl pkcs12 -nokeys -in my.domain.com.p12 -out domain.pem.

Here is part of my configuration file:
listen 443 ssl;

server_name nginx's public DNS name nginx.domain.com;
underscores_in_headers on;

ssl_certificate C:\certs\domain.pem;
ssl_certificate_key C:\certs\domain.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols SSLv2 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

location / {
proxy_ssl_session_reuse off;
proxy_pass https://my.domain.com:8060/;
proxy_pass_request_headers on;

Note: I've tried the conf with proxy_ssl_session_reuse off in the conf and without it being in the conf file.

I"m using the same wildcard certificate for both sites.


2016/11/11 06:53:52 [debug] 732#3308: *1 http cleanup add: 01187680
2016/11/11 06:53:52 [debug] 732#3308: *1 get rr peer, try: 1
2016/11/11 06:53:52 [debug] 732#3308: *1 stream socket 440
2016/11/11 06:53:52 [debug] 732#3308: *1 connect to IPADDRESS:8060, fd:440 #4
2016/11/11 06:53:52 [debug] 732#3308: *1 select add event fd:440 ev:0
2016/11/11 06:53:52 [debug] 732#3308: *1 select add event fd:440 ev:1
2016/11/11 06:53:52 [debug] 732#3308: *1 http upstream connect: -2
2016/11/11 06:53:52 [debug] 732#3308: *1 malloc: 0110EDD0:128
2016/11/11 06:53:52 [debug] 732#3308: *1 event timer add: 440: 60000:1396542274
2016/11/11 06:53:52 [debug] 732#3308: *1 http finalize request: -4, "/?" a:1, c:2
2016/11/11 06:53:52 [debug] 732#3308: *1 http request count:2 blk:0
2016/11/11 06:53:52 [debug] 732#3308: worker cycle
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:380 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:436 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:428 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:432 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:440 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:440 wr:1
2016/11/11 06:53:52 [debug] 732#3308: select timer: 500
2016/11/11 06:53:52 [debug] 732#3308: select ready 1
2016/11/11 06:53:52 [debug] 732#3308: select write 440
2016/11/11 06:53:52 [debug] 732#3308: *1 post event 01158048
2016/11/11 06:53:52 [debug] 732#3308: timer delta: 0
2016/11/11 06:53:52 [debug] 732#3308: posted event 01158048
2016/11/11 06:53:52 [debug] 732#3308: *1 delete posted event 01158048
2016/11/11 06:53:52 [debug] 732#3308: *1 http upstream request: "/?"
2016/11/11 06:53:52 [debug] 732#3308: *1 http upstream send request handler
2016/11/11 06:53:52 [debug] 732#3308: *1 set session: 00000000
2016/11/11 06:53:52 [debug] 732#3308: *1 tcp_nodelay
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_do_handshake: -1
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_get_error: 2
2016/11/11 06:53:52 [debug] 732#3308: *1 select del event fd:440 ev:1
2016/11/11 06:53:52 [debug] 732#3308: worker cycle
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:380 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:436 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:428 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:432 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:440 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select timer: 500
2016/11/11 06:53:52 [debug] 732#3308: select ready 1
2016/11/11 06:53:52 [debug] 732#3308: select read 440
2016/11/11 06:53:52 [debug] 732#3308: *1 post event 01144040
2016/11/11 06:53:52 [debug] 732#3308: timer delta: 0
2016/11/11 06:53:52 [debug] 732#3308: posted event 01144040
2016/11/11 06:53:52 [debug] 732#3308: *1 delete posted event 01144040
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL handshake handler: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_do_handshake: -1
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_get_error: 5
2016/11/11 06:53:52 [error] 732#3308: *1 peer closed connection in SSL handshake (10054: An existing connection was forcibly closed by the remote host) while SSL handshaking to upstream, client: IPADDRESS, server: nginx.domain.com, request: "GET / HTTP/1.1", upstream: "https://IPADDress:8060/", host: "nginx.domain.com"
2016/11/11 06:53:52 [debug] 732#3308: *1 http next upstream, 2
2016/11/11 06:53:52 [debug] 732#3308: *1 free rr peer 1 4
2016/11/11 06:53:52 [debug] 732#3308: *1 finalize http upstream request: 502
2016/11/11 06:53:52 [debug] 732#3308: *1 finalize http proxy request
2016/11/11 06:53:52 [debug] 732#3308: *1 close http upstream connection: 440
2016/11/11 06:53:52 [debug] 732#3308: *1 free: 0110EDD0, unused: 52
2016/11/11 06:53:52 [debug] 732#3308: *1 event timer del: 440: 1396542274
2016/11/11 06:53:52 [debug] 732#3308: *1 select del event fd:440 ev:0
2016/11/11 06:53:52 [debug] 732#3308: *1 reusable connection: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 http finalize request: 502, "/?" a:1, c:1
2016/11/11 06:53:52 [debug] 732#3308: *1 http special response: 502, "/?"
2016/11/11 06:53:52 [debug] 732#3308: *1 HTTP/1.1 502 Bad Gateway
Server: nginx/1.11.4
Date: Fri, 11 Nov 2016 11:53:52 GMT
Content-Type: text/html
Content-Length: 575
Connection: keep-alive

2016/11/11 06:53:52 [debug] 732#3308: *1 write new buf t:1 f:0 011876D4, pos 011876D4, size: 157 file: 0, size: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 http write filter: l:0 f:0 s:157
2016/11/11 06:53:52 [debug] 732#3308: *1 http output filter "/?"
2016/11/11 06:53:52 [debug] 732#3308: *1 http copy filter: "/?"
2016/11/11 06:53:52 [debug] 732#3308: *1 malloc: 01187840:4096
2016/11/11 06:53:52 [debug] 732#3308: *1 http postpone filter "/?" 01187890
2016/11/11 06:53:52 [debug] 732#3308: *1 write old buf t:1 f:0 011876D4, pos 011876D4, size: 157 file: 0, size: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 write new buf t:0 f:0 00000000, pos 014B0878, size: 120 file: 0, size: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 write new buf t:0 f:0 00000000, pos 014AF6E0, size: 53 file: 0, size: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 write new buf t:0 f:0 00000000, pos 014AF748, size: 402 file: 0, size: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 http write filter: l:1 f:0 s:732
2016/11/11 06:53:52 [debug] 732#3308: *1 http write filter limit 0
2016/11/11 06:53:52 [debug] 732#3308: *1 malloc: 01198E68:16384
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL buf copy: 157
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL buf copy: 120
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL buf copy: 53
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL buf copy: 402
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL to write: 732
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_write: 732
2016/11/11 06:53:52 [debug] 732#3308: *1 http write filter 00000000
2016/11/11 06:53:52 [debug] 732#3308: *1 http copy filter: 0 "/?"
2016/11/11 06:53:52 [debug] 732#3308: *1 http finalize request: 0, "/?" a:1, c:1
2016/11/11 06:53:52 [debug] 732#3308: *1 set http keepalive handler
2016/11/11 06:53:52 [debug] 732#3308: *1 http close request
2016/11/11 06:53:52 [debug] 732#3308: *1 http log handler
2016/11/11 06:53:52 [debug] 732#3308: *1 free: 01186838, unused: 4
2016/11/11 06:53:52 [debug] 732#3308: *1 free: 01187840, unused: 3754
2016/11/11 06:53:52 [debug] 732#3308: *1 free: 01186430
2016/11/11 06:53:52 [debug] 732#3308: *1 hc free: 00000000 0
2016/11/11 06:53:52 [debug] 732#3308: *1 hc busy: 00000000 0
2016/11/11 06:53:52 [debug] 732#3308: *1 free: 01198E68
2016/11/11 06:53:52 [debug] 732#3308: *1 tcp_nodelay
2016/11/11 06:53:52 [debug] 732#3308: *1 reusable connection: 1
2016/11/11 06:53:52 [debug] 732#3308: *1 event timer add: 428: 65000:1396547274
2016/11/11 06:53:52 [debug] 732#3308: worker cycle
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:380 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:436 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:428 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:432 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select timer: 500
2016/11/11 06:53:52 [debug] 732#3308: select ready 1
2016/11/11 06:53:52 [debug] 732#3308: select read 436
2016/11/11 06:53:52 [debug] 732#3308: *3 post event 01143FF0
2016/11/11 06:53:52 [debug] 732#3308: timer delta: 109
2016/11/11 06:53:52 [debug] 732#3308: posted event 01143FF0
2016/11/11 06:53:52 [debug] 732#3308: *3 delete posted event 01143FF0
2016/11/11 06:53:52 [debug] 732#3308: *3 SSL handshake handler: 0
2016/11/11 06:53:52 [debug] 732#3308: *3 SSL_do_handshake: 1
2016/11/11 06:53:52 [debug] 732#3308: *3 select del event fd:436 ev:0
2016/11/11 06:53:52 [debug] 732#3308: *3 SSL: TLSv1, cipher: "ECDHE-RSA-AES256-SHA SSLv3 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA1"
2016/11/11 06:53:52 [debug] 732#3308: *3 reusable connection: 1
2016/11/11 06:53:52 [debug] 732#3308: *3 http wait request handler
2016/11/11 06:53:52 [debug] 732#3308: *3 malloc: 0118B120:256
2016/11/11 06:53:52 [debug] 732#3308: *3 malloc: 01113D90:1024
2016/11/11 06:53:52 [debug] 732#3308: *3 SSL_read: -1
2016/11/11 06:53:52 [debug] 732#3308: *3 SSL_get_error: 2
2016/11/11 06:53:52 [debug] 732#3308: *3 select add event fd:436 ev:0
2016/11/11 06:53:52 [debug] 732#3308: *3 free: 01113D90
2016/11/11 06:53:52 [debug] 732#3308: worker cycle
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:380 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:432 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:428 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select event: fd:436 wr:0
2016/11/11 06:53:52 [debug] 732#3308: select timer: 500
2016/11/11 06:53:52 [debug] 732#3308: select ready 1
2016/11/11 06:53:52 [debug] 732#3308: select read 428
2016/11/11 06:53:52 [debug] 732#3308: *1 post event 01143F50
2016/11/11 06:53:52 [debug] 732#3308: timer delta: 125
2016/11/11 06:53:52 [debug] 732#3308: posted event 01143F50
2016/11/11 06:53:52 [debug] 732#3308: *1 delete posted event 01143F50
2016/11/11 06:53:52 [debug] 732#3308: *1 http keepalive handler
2016/11/11 06:53:52 [debug] 732#3308: *1 malloc: 01113D90:1024
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_read: 1
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_read: 364
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_read: -1
2016/11/11 06:53:52 [debug] 732#3308: *1 SSL_get_error: 2
2016/11/11 06:53:52 [debug] 732#3308: *1 reusable connection: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 malloc: 01186C38:4096
2016/11/11 06:53:52 [debug] 732#3308: *1 event timer del: 428: 1396547274
2016/11/11 06:53:52 [debug] 732#3308: *1 http process request line
2016/11/11 06:53:52 [debug] 732#3308: *1 http request line: "GET /favicon.ico HTTP/1.1"
2016/11/11 06:53:52 [debug] 732#3308: *1 http uri: "/favicon.ico"
2016/11/11 06:53:52 [debug] 732#3308: *1 http args: ""
2016/11/11 06:53:52 [debug] 732#3308: *1 http exten: "ico"
2016/11/11 06:53:52 [debug] 732#3308: *1 http process request header line
2016/11/11 06:53:52 [debug] 732#3308: *1 http header: "Host: nginx.domain.com"
2016/11/11 06:53:52 [debug] 732#3308: *1 http header: "Connection: keep-alive"
2016/11/11 06:53:52 [debug] 732#3308: *1 http header: "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"
2016/11/11 06:53:52 [debug] 732#3308: *1 http header: "Accept: */*"
2016/11/11 06:53:52 [debug] 732#3308: *1 http header: "DNT: 1"
2016/11/11 06:53:52 [debug] 732#3308: *1 http header: "Referer: https://nginx.domain.com/"
2016/11/11 06:53:52 [debug] 732#3308: *1 http header: "Accept-Encoding: gzip, deflate, sdch, br"
2016/11/11 06:53:52 [debug] 732#3308: *1 http header: "Accept-Language: en-US,en;q=0.8,es;q=0.6"
2016/11/11 06:53:52 [debug] 732#3308: *1 http header done
2016/11/11 06:53:52 [debug] 732#3308: *1 generic phase: 0
2016/11/11 06:53:52 [debug] 732#3308: *1 rewrite phase: 1
2016/11/11 06:53:52 [debug] 732#3308: *1 test location: "/"
2016/11/11 06:53:52 [debug] 732#3308: *1 using configuration "/"
2016/11/11 06:53:52 [debug] 732#3308: *1 http cl:-1 max:1048576
2016/11/11 06:53:52 [debug] 732#3308: *1 rewrite phase: 3
2016/11/11 06:53:52 [debug] 732#3308: *1 post rewrite phase: 4
2016/11/11 06:53:52 [debug] 732#3308: *1 generic phase: 5
2016/11/11 06:53:52 [debug] 732#3308: *1 generic phase: 6
2016/11/11 06:53:52 [debug] 732#3308: *1 generic phase: 7
2016/11/11 06:53:52 [debug] 732#3308: *1 access phase: 8
2016/11/11 06:53:52 [debug] 732#3308: *1 access phase: 9
2016/11/11 06:53:52 [debug] 732#3308: *1 access phase: 10
2016/11/11 06:53:52 [debug] 732#3308: *1 post access phase: 11
2016/11/11 06:53:52 [debug] 732#3308: *1 http init upstream, client timer: 0

I appreciate any help.

Not able to stream more than 5 downloads at once. (1 reply)

$
0
0
Hello Nginx Forum. I have a huge problem with my server and i´m completly lost here. Before i start with the settings i´ve already tr´d to adjust please let me explain as detailed as possible whats going on.

We are running a Online Shop (we make software). We have moved our Website to a new Server running nginx. Wordpress is running fine. Our Software Products are very big, up to 16GB per File. To hide the Source we stream the Files to our customers via php (Wordpress product download settings: xaccel_redirect/xsendfile). XsendFile is installed on the server. The downloads run stable and finish fine since we have changed proxy_max_temp_file_size to "0". Before they aborted after 1GB.


The Problem: We can run only 4 Downloads at once. As soon as 5 Customers downloading a Product, the Page stands still and for new visitors a 503 Error (Page temporarily not available) appears. A further stream is not possible. It feels like there are 5 available threats and if they are used everything else gets in que/on hold.

We have already activated multi_accept. Also we have set the worker_processes to 16. But still no luck :(
In therm´s of servers we are not really experienced and the server is a managed server. Means for every change i have to send a mail to the support.

Has anyone a idea what setting could block more than 5 connections on our Server ?

How to have one vhost for www/non-www + http to https (no replies)

$
0
0
I'm looking to have one nginx host file which handles domain.tld and www.domain.tld with and without https and redirects all of them to use https and www so any visitor would end up at https www.domain.tld

I've tried various options and one of these 4 options was always incorrect.

My best lead so far is this advice I got: https://gist.github.com/bjornjohansen/b5a763a57a460edac47c8560502f6400 - does that look like hte best solution?
If it does could someone help me with what would go in the 2nd server block?

here is my real vhost config: http://pastebin.com/fYq2CjLf

any help is much appreciated, been struggling with this all day.

how to check destination url response code is 200 before redirecting with nginx (no replies)

$
0
0
I have two domain names, for example domain1.com and domain1.org. All requests from domain1.com are redirected to domain1.org, with uri of course. How can I check with nginx that uri on domain1.org returns 200 response code and only after this do redirect. If the code will be 404 or another just return this code from domain1.com without any redirect.
Viewing all 2931 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>