Brandon Edling's picture

I have a Turnkey Wordpress environment (that I upgraded to 3.0.1) and I'm wanting to host standalone HTML files inside it.  So for example, when users go to http://mysite.com, they'll get Wordpress, but when they go to http://mysite.com/content/test.html the HTML can be displayed. 

Currently when I try to do this, I keep getting a "It Works!" HTML page (not what I want).

Any help is appreciated.

Forum: 
Jeremy Davis's picture

AFAIK what you need to do is fiddle with virtual hosts in the Apache config. I'm not well versed in this stuff (so I could be wrong). If you're keen and want to have a go before someone who can help out comes along, have a search/read about that online and it should head you in the right direction.

You can manually edit the config file(s) but another way is to have a play with Webmin. I think from memory the Apache module should already be installed (look under Servers>>Apache along the top menu in Webmin). Remember you'll need to restart apache for new settings to be applied (again from memory there's a "Restart Apache" button in Webmin).

If you get it worked out perhaps post back with the steps you took so other TKL users trying to do the same thing won't need to work it out themselves.

stuartindigo's picture

Having used the appliance whilst setting up some specialist searches of the db, I find that the most important thing to remember is that the root domain for the appliance is not at  the root www directory but at www/wordpress .

Hence create any directories under the wordpress directory, not the standard root directory.

Jeremy Davis's picture

It may be as simple as adding a folder at /var/www/wordpress/new-folder. You can test it by making the folder and try browsing to it (http://<appliance-ip>/new-folder/) and see what happens.

Brandon Edling's picture

Yeah, I tried that first, actually.  No dice.

Adrian Moya's picture

Don't just create an empty directory, as apache is probably configure to not show directories index, include a file, say index.html and when you access, write the whole url (/wordpress/mysite/index.html). If it doesn't work, paste here the results of

tail /var/log/apache2/access.log 

To see what's really happening. 

Brandon Edling's picture

There is indeed an .html file in that directory; it's not empty.  I can link to other assets in that directory (all the same permissions and ownership), and will display all the files (jpeg, png, etc.) just fine... just not html.

 

tail /var/long/apache2/access.log returns nothing

 

Thanks,

Sapridyne

Jeremy Davis's picture

Although obviously WordPress & Moodle are different creatures but this other thread may be at least vaguely relevant to you.

Have a read, try some of the stuff over there and post back here to let me know how you go. I may be able to assist you to adjust it to your usage scenario (or maybe not seeing as I'm still a bit of an Apache newb!)

Add new comment