Difference between revisions of "Server name"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
− | + | * <code>server_name</code> | |
+ | * <code>server_name _;</code> | ||
− | server_name | + | server { |
+ | [[listen]] 80; | ||
+ | server_name ~^(?<name>.+)\.example\.com$; | ||
+ | [[return]] 301 http://example.com/$name$request_uri; | ||
+ | } | ||
== See also == | == See also == |
Revision as of 17:48, 26 August 2021
http://nginx.org/en/docs/http/server_names.html
server_name
server_name _;
server { listen 80; server_name ~^(?<name>.+)\.example\.com$; return 301 http://example.com/$name$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: