Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Web Proxy Filtering and Caching
(Moderator:
fabian
) »
How to return 404 for root domain
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to return 404 for root domain (Read 1420 times)
dv8
Newbie
Posts: 1
Karma: 0
How to return 404 for root domain
«
on:
July 29, 2022, 09:37:05 pm »
I have a subdomain (ex. sub.domain.io) configured and working fine with Nginx over SSL. I would like to configure the root domain (ex. domain.io) to return a 404 instead of forwarding to the same upstream server. I know the configuration to do this in the /usr/local/etc/nginx/nginx.conf file is simple:
server {
listen 443;
server_name domain.io;
return 404;
}
When I add this server to the conf and restart, the configuration is removed. I assume Nginx is reapplying the GUI config. How do I achieve the same simple server setup in the GUI? I tried a new HTTP Server in the GUI with servername domain.io but it did not seem to work.
Thanks for your help!
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Web Proxy Filtering and Caching
(Moderator:
fabian
) »
How to return 404 for root domain