Skip to content

Commit

Permalink
test nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
giovana-morais committed Oct 12, 2023
1 parent 09b18b5 commit fd420e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ http {
sendfile on;

# Must read the body in 5 seconds.
<% if ENV["PELICAN_SITEURL"] %>
<% if ENV["SITEURL"] %>
server {
listen <%= ENV["PORT"] %>;
rewrite ^(.*) <%= ENV["PELICAN_SITEURL"] %>$1 permanent;
rewrite ^(.*) <%= ENV["SITEURL"] %>$1 permanent;
}
<% end %>

server {
listen <%= ENV["PORT"] %>;
port_in_redirect off;
root /app/public;
<% if ENV["PELICAN_SITEURL"] %>
server_name <%= require 'uri'; URI.parse(ENV["PELICAN_SITEURL"]).host %>;
<% if ENV["SITEURL"] %>
server_name <%= require 'uri'; URI.parse(ENV["SITEURL"]).host %>;
<% end %>

location / {
Expand Down

0 comments on commit fd420e0

Please sign in to comment.