跳转www

#先监听 exp.com域名,然后转发到www下面
server {
  listen         80;
  server_name    exp.com;

  rewrite ^(.*) $scheme://www.$server_name$1 permanent;
}

#www.exp.com配置
server {
  listen       80;
  root         path;
  server_name  www.exp.com;
  
  location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
   }
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2021-08-12
  • 2021-08-08
猜你喜欢
  • 2021-08-02
  • 2021-10-26
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案