-
Notifications
You must be signed in to change notification settings - Fork 2
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): basic MVP, just ngx_pagespeed pr…
…oxy to inclusao.etica.ai
- Loading branch information
Showing
3 changed files
with
46 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
FROM pagespeed/nginx-pagespeed | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
COPY ./etc/nginx/nginx.conf /etc/nginx/nginx.conf | ||
#COPY ./etc/nginx/sites-available/nginx.vh.default.conf /etc/nginx/sites-available/default | ||
#COPY ./etc/nginx/sites-available/etica.ai.conf /etc/nginx/sites-available/default | ||
COPY ./etc/nginx/sites-available/inclusao.etica.ai.conf /etc/nginx/conf.d/inclusao.etica.ai.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,29 @@ | ||
server { | ||
listen 80; | ||
server_name rp4fb.*; | ||
|
||
location / { | ||
access_log off; | ||
# inclusao.etica.ai is hosted at GitHub pages, but is behind | ||
# cloudflare (that could complain about this crawler) | ||
proxy_pass http://fititnt.github.io:80; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
#proxy_set_header Host $host; | ||
proxy_set_header Host 'inclusao.etica.ai'; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
pagespeed on; | ||
|
||
# Needs to exist and be writable by nginx. Use tmpfs for best performance. | ||
pagespeed FileCachePath /var/cache/ngx_pagespeed; | ||
|
||
# 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$" { } | ||
|
||
} |
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