AndrewH's picture

Forgive me if this has an obvious answer somewhere that I missed.

I'm using the TKL LXC LinuX containers appliance and I've configured a couple of Wordpress containers. I would like to test them from the Internet but before I do that I would like to disable access to the control panel via port 80 and simply return a "parked" page or nothing. nginx-proxy is handling the proxying for the Wordpress sites.

Is there something like:

nginx_ensite 000-default

nginx_dissite 000-default

What is the recommended way to do this?



Jeremy Davis's picture

So AFAIK it isn't serving any sites, it's just proxying data from the servers behind it. If you disable the proxy, then it won't really allow you to test anything; it will give you the same result as if the server was broken... You could reconfigure Nginx to serve something, but IMO that defeats the whole point of runnings separate containers!

So to get what you are after, you'll either need to adjust each server individually or test using a different backend server (e.g. LAMP).

Is there any reason why you can't just leave the default WordPress there? Why do you need to restrict access to it? So long as you use a good password, then no one should be able to gain access anyway.

As an alternate thought, IIRC WordPress has a "maintenance mode" which will just display a message such as "this site is currently offline due to maintenance" or something similar. Perhaps that will give you what you desire for the least effort?

If none of that suits your purpose, then as I hinted earlier, perhaps just use a different appliance such as the LAMP appliance to serve some generic static data.

TBH I'm curious what you're up to and why you can't just test with the default WordPress...

last minute update: I did just realise that I am working from assumptions rather than concrete knowledge. It is possible I've missed something or misunderstand. It has been quite a long time since I have even started a copy of the LXC appliance.

AndrewH's picture

I may not have explained it well.

The containers (a couple of wordpress and an owncloud container) and proxying are working well.

It's the root page for the appliance that I wanted to disable. In the end, I just replaced /var/www/index.html with my own "under construction" page. I can still access the webshell and webmin as needed. 

My question was more toward an "official" way that I was missing.

Thanks again for responding.



Jeremy Davis's picture

Thanks for clearing that up. I thought that you were wanting to test the proxied sites but without actually proxying the WordPress site(s) themselves. And I didn't really understand the point of that.

It's a great reminder to me that if someone is suggesting something that I think is silly; then the most likely scenario is that I misunderstand! :)

It sounds like you have worked it out. Thanks for posting back to bridge the gap! :)

Add new comment