spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » NGINX » Page 1
Redirect dynamic top level domains to www subdomains with Nginx
As discussed, either you declare your subdomains server blocks and make sure if you are using a regex too that it's preceding the server block redirecting to www (regex are tested sequentially), or you refine your regex so it would be ^[^.]+.(com|co.uk|eu|ly)$. Edit : As you are only letting one server block in your configuration, everything will go throw this unique server block anyway, so you n

Categories : Nginx

how to integrate yii2 with ispconfig3
You can move index.php (and .htaccess) from the frontend/web to any place you want. Just change the paths in it and it should work just fine. I did this in Yii1 and I see no reason why it would not work in yii2.

Categories : Nginx

NGINX - Remove double slash after .com
The real question is : how did you end up with such URLs ? If you use nginx normally you will not get such a behaviour as nginx is normalizing URIs (i.e. it will compress several adjacent slashes in one, decode URLs and resolve relative paths). The normalization result of the URI from the current request being processed is stored in $uri variable. So the following part should never be necessary

Categories : Nginx

Nginx cannot restart via Ansible
The handler was: - name: restart nginx service: name=nginx state=restarted enabled=yes It seems that the state and enabled flags cannot both be present. By trimming the above to the following, it worked. - name: restart nginx service: name=nginx state=restarted Why this is, and why it started breaking suddenly, I do not know.

Categories : Nginx

Automatically restarting HHVM when it stops responding but process not dead
kristapsk posted a solution on Official bug regarding this topic. This is the script he told to add to cron to be executed every 2 minutes. I have modified it a bit to make it work with prebuilt packages of HHVM. #! /bin/bash PID="`cat /var/run/hhvm/pid`" if [ "$PID" == "" ]; then echo No PID, starting up /etc/init.d/hhvm start else if [ "`ps ax -o pid | grep $PID`" == "" ]; then

Categories : Nginx

How to pass request to multiple servers with Nginx
Sure, using proxy_pass/fastcgi_pass/uswgi_pass with upstream.

Categories : Nginx

nginx appears to use rewrite regardless of server_name
After a while... I found that I needed the location / { } wrapped around it server { listen 80; server_name web.example.com; access_log /var/www/example/shared/log/web.access.log; error_log /var/www/example/shared/log/web.error.log debug; location / { rewrite ^/(.*)$ http://www.example.net$request_uri permanent; } }

Categories : Nginx

NGINX location rewrite
The documentation states that you can use variables in fastcgi_param values : Sets a parameter that should be passed to the FastCGI server. The value can contain text, variables, and their combination. These directives are inherited from the previous level if and only if there are no fastcgi_param directives defined on the current level. So you can use a location with a regular expression an

Categories : Nginx


Recently Add
Can't overwrite location block with other
Redirect dynamic top level domains to www subdomains with Nginx
how to integrate yii2 with ispconfig3
NGINX - Remove double slash after .com
Nginx cannot restart via Ansible
Automatically restarting HHVM when it stops responding but process not dead
How to pass request to multiple servers with Nginx
nginx appears to use rewrite regardless of server_name
NGINX location rewrite
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.