-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverse-proxy-for-free-basics (#62): created rp4fb-subdomain.conf
- Loading branch information
Showing
5 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
docker/reverse-proxy-for-free-basics/etc/nginx/sites-available/rp4fb-subdomain.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
server { | ||
listen 80; | ||
#server_name rp4fb.*; | ||
server_name ~^(rp4fb\.)?(?<mydomain>.+)$; | ||
|
||
location / { | ||
access_log off; | ||
proxy_pass http://$mydomain:80; | ||
#proxy_pass http://inclusao.etica.ai:80; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header Host $mydomain; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
# Ensure requests for pagespeed optimized resources go to the pagespeed handler | ||
# and no extraneous headers get set. | ||
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { | ||
add_header "" ""; | ||
} | ||
location ~ "^/pagespeed_static/" { } | ||
location ~ "^/ngx_pagespeed_beacon$" { } | ||
|
||
} |