I try to set a page in WordPress as a standalone subdomain site by alias.
I found below link from stack and it indeed works for me for sub-domain reassignment
- How to Alias a Page to a Sub-Domain
Below is my setting.
server {
listen 443 ssl;
server_name abc.example.com;
location / {
proxy_pass https://127.0.0.1/abc$request_uri;
proxy_set_header Host example.com;
}
}
But, on the proxied subdomain, I cannot load font files properly. I’ve tried both local font files and Google remote font, but neither of them works.
I guess there is an issue with proxt header and firewall that disallows to call the font file when the domain name changes.
I’ve tried with simple html coded webpage w/ local font files, which indeed loaded font properly.
I believe it is somehow connected to WordPress’s security setting, or insufficient proxy header setting that I don’t know much of.
I’ve also tried location in the same server block, but font files are not loaded.
- NGINX Proxy Pass
server {
listen 443 ssl;
server_name example.comg;
root /var/www/websites/example;
location ^~ /abc/ {
proxy_pass https://abc.example.com;
proxy_set_header Host example.com;
}
}
NginxBeginner1864 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.