Serve WordPress page at subdomain

  • Posted February 17, 2014

How can I configure the Nginx Virtual Host to serve (a WordPress page) when a visitor visits Note: I do not want a rewrite (I want the visitor to see the subdomain url). Also, I would like to rewrite visits to the page ( to . I have searched for a long time trying to solve this, but have had no luck. Thanks!


My Comment might be late but really effective, i have developed a WordPress Plugin which does the job, i have used WordPress Re-write rule hooks to accomplish this, which make it light weight and doesn’t have any effect on server. all you need is WildCard Subdomain. Here is the link:

May be you have already find a solution, but this might help the other users. :)

Regards Alisaleem252

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

To setup a domain or subdomain you do it the same way, here’s an example of a nginx block to serve a Wordpress site: <br> <br> <br> <br>Just replace the server_name directive with your subdomain. <br> <br>For the redirection, in your main domain’s block add something like: <br> <br> <br>location /status { <br> return 301 $scheme://$request_uri; <br>} <br> <br> <br>Contact me if you need any more help ;D <br> <br>