Difference between revisions of "Server (Nginx)"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{Draft}} | {{Draft}} | ||
+ | {{lowercase}} | ||
+ | |||
+ | [[Subdomain redirection]]: | ||
+ | [[server]] { | ||
+ | [[listen]] 80; | ||
+ | [[server_name]] ~^(?<my[[subdomain]]>.+)\.example\.com$; | ||
+ | [[return]] 301 http://example.com/$mysubdomain$[[request_uri]]; | ||
+ | } | ||
+ | |||
Revision as of 22:03, 20 October 2021
This article is a Draft. Help us to complete it.
server { listen 80; server_name ~^(?<mysubdomain>.+)\.example\.com$; return 301 http://example.com/$mysubdomain$request_uri; }
See also
- Nginx:
nginx -t
,nginx.conf
,/etc/nginx/fastcgi.conf
, Nginx Sample Configurations,server
,ssl_certificate
,redirect
,return
,rewrite
,sendfile
,request_uri
,server_name
,listen
,/etc/nginx/snippets/
,/etc/nginx/sites-enabled/default
- Web server: Nginx:
/etc/nginx/nginx.conf
,nginx -t
, Nginx logs, Nginx change log, PHP,php-fpm
, Let's encrypt, Nginx directives, Reverse Proxy, Configure HTTP redirection Nginx, Return,proxy_pass (Reverse proxy)
,ngx_http_rewrite_module
,/etc/nginx/sites-enabled/
,error.log
,access.log
,/nginx status
, AIO
Advertising: