nginx pan-Domain Name

2010-04-05  来源:本站原创  分类:Internet  人气:230 

In the dns to do a general reference to the host, using nginx to do two domain rewirte

For example / index.php? Id = 1 to

server (
listen 80;
access_log off;
root / usr / www / afen /;

location / (
index index.php index.html index.htm;


server (

server_name ~^(.*) \. afen \. cn $;
set $ name $ 1;
rewrite ^ $ name $ request_uri;

  • nginx secondary domain name matches the root directory of the sub-folders 2010-05-24

    Binding domain server_name *.; Get host name if ($ host ~ * (.*) \ .(.*) \ .(.*)) ( set $ domain $ 1; ) Definition List root html / abc / $ domain /; location / ( root html / abcd / $ domain; index index.html index.php; ) -------------------

  • nginx unified domain approach 2010-09-09

    Requirements: will be redirected to, empathy will be redirected to the last - basically using the Flag break - stop Rewrite, not to match redirect - return to temporary redirect HTTP status 30

  • how to config Apache for many domain name 2010-09-16

    ServerAlias: Server alias in Apache can be used to set the virtual host computer is a domain name, you can resolve the domain name for receiving pan. Specific settings as follows: First, to set the virtual host multiple domain names to receive A virt

  • php管理nginx虚拟主机shell脚本实例 2014-07-24

    这篇文章主要介绍了php管理nginx虚拟主机shell脚本的实现方法,以实例形式讲述了通过PHP脚本管理nginx虚拟主机的方法,具有不错的借鉴价值,需要的朋友可以参考下 本文实例讲述了php管理nginx虚拟主机shell脚本,分享给大家供大家参考.具体分析如下: 使用php作为shell脚本是一件很方便的事情.理所当然,我们可以使用php脚本来管理 nginx虚拟主机,下面是笔者的 脚本 文件供各位参考: #!/usr/bin/php -q <?php start: fwrite(STDO

  • Nginx 虚拟主机 配置 支持独立urlwrite 文件, php-fpm独立用户和php.... 2011-09-23

    Nginx 虚拟主机 环境配置. 最近租了台服务器,准备做一些网站.纠结apache/nginx很久,最后选定了Nginx+php-fpm. 因为可能会有几个站,为了安全,我希望每个站点直接都能尽量独立,避免互相影响. 主要实现功能: -能够相对快捷的添加虚拟主机. -每个虚拟主机直接相对独立,避免一个网站有漏洞,全服务器手影响 -能够方便的配置urlrewrite,还是需要reload或restart ( 谁让nginx 不支持像 .htaccess 这样吗方便的东西呢?) -每个虚拟主机能独

  • How to Pan-domain binding (javaidc) 2010-05-07

    Many companies have set up a number of Web sites to meet the needs of employees in the work, to save money, Zhexiewangzhan usually Caiyongxuni host technology, that is, set up a server with multiple websites, the staff access to those sites using the

  • Nginx on the same IP. The same port. Different domain forwarding 2010-08-18

    In the default Nginx Proxy is behind the Real Server can only do port forwarding, domain forwarding and not do. If you want to use Nginx on the back end is the same IP, same port forwarding will need to configure a different domain name Nginx Proxy.

  • nginx configuration to prevent multiple domain blind jump when there is no www 2010-11-03

    nginx installed, the default nginx.conf only one server configuration. Generally like Jiangzi of: server { listen 80; server_name; index index.html index.htm index.php; root /home/www; location ~ .*\.(php|php5)?$ { fastcgi_pass unix:/t

  • Domain names point to in the pan 2010-11-29

    Doing the second level domain to support the project, the need to configure multiple domain names point to, and the second level domain is a dynamic increase. In the change / etc / hosts when there is such a demand would be: *. do

  • nginx pseudo-static redirection, including the domain name. directory. files and other methods 2011-05-20

    Web site construction needs in many cases of redirection: structural changes, such as web directory, web page rename, change the extension page, and changes in this domain. If you do not do redirection, user favorites and search engine database in th

  • multi domain nginx configuration to prevent the blind do not jump at www 2010-11-03