Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

14711 - 404 page on tugboat #234

Merged
merged 16 commits into from
Nov 7, 2023
6 changes: 6 additions & 0 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,15 @@ services:
# Build vets-website so assets are available (various widgets, fonts, etc)
- ./scripts/build-vets-website.sh

# Setup nginx to serve 404 page.
- cp -f "${TUGBOAT_ROOT}"/.tugboat/vhost-web.conf /etc/nginx/conf.d/default.conf

# Setup storybook-*. vhost to serve compiled storybook.
- cp "${TUGBOAT_ROOT}"/.tugboat/vhost-storybook.conf /etc/nginx/conf.d/storybook.conf

# Restart nginx with the new config
- sudo service nginx reload

# Install and use our yarn version
- corepack enable
- corepack prepare [email protected] --activate
Expand Down
2 changes: 1 addition & 1 deletion .tugboat/vhost-storybook.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
location /50x.html {
root /usr/share/nginx/html;
}
}
48 changes: 48 additions & 0 deletions .tugboat/vhost-web.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
server {
listen 80;
server_name localhost;

#access_log /var/log/nginx/host.access.log main;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

# use next-build 404 page
error_page 403 404 /404/index.html;
location = /404/index.html {
root /usr/share/nginx/html;
internal;
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
Loading