- I created a new folder in /var/www/subdomain where I install a new copy of wordpress. Note that /var/www/html contains my maindomain.
- The duplicate the config site in the blog I mentioned above (my-site), so now I have subdomain ni /etc/nginx/sites-available.
- Make the following modifications (first 2 lines):
listen 80;
listen [::]:80; - Basically, you can't have 2 virtual configurations with default_server marker.
- Your sub domain should now be accessible.
How to setup a subdomain in your nginx server
Lately I've created a sub-domain for one of my website. I hope you follow this blog on how to setup your nginx wordpress site. In the same server where I host my maindomain.com, I've added a subdomain.maindomain.com. And here is how:
0 nhận xét:
Đăng nhận xét