Plesk is kind of freaky creature. Working with it can be a frustrating experience. Not when working with the graphical web interface. Used in that way, it’s easy to create/modify/remove sub-domains and other important tasks. However, the guys from Paralles do not expect apache to server something else than static pages. How else can it be explained, that touching a vhost.conf file is something that is described in appendix A, Advanced Features, in the Plesk manual?
So just assume that you have create a new subdomain and you want to make your CSS files available via
/css instead of going via some hardwired domain URL. So all you want to have is an alias like
Alias /css "/path/to/my/css/folder"
Ok, but where to enter? When you look at the folder structure and files created by Plesk it is by no means clear what to do. But hey, what are manuals good for anyway? What you discover is that Plesk created a folder like
for your subdomain. The folder is empty. It would be really great if Plesk would in addition create a README file in that folder. That file would then state something like this:
To configure your subdomain, add herein a file name vhost.conf. Put any Apache configurations in this file you like but be aware that this file is being included in a virtual host definition.
Once you have have added vhost.conf, please reconfigure this subdomain so that your file is taken into account. You do this by
$ /usr/local/psa/admin/sbin/websrvmng --reconfigure-all
You need to do this only once, because this command does nothing more than insert a Include statement in /path/to/domain/conf/http.include. But refrain from do it manually because websrvmng will rewrite that file from scratch on the next run.
Oh, and btw notice that regardless of what our manual says you can only have a vhost.conf in a subdomain’s conf folder. Any vhost_ssl.conf therein is not taken into account.
Good luck and have a nice day.
Unfortunately, that README file is missing. Unfortunately.
mod_autoindex is a plugin for the the Apache web server. The plugin is responsible for presenting the contents of a folder if folder browsing has been enabled and if a default file, traditionally
index.html, is not available.
So far so good except that the default presentation generated by
mod_autoindex is rather boring. We want to have it a bit more spicy. Therefore
mod_autoindex has a lot of applicable options which are crying to be used.
Apache’s webserver has got a reputation of being difficult to configure and
mod_autoindex is actually a perfect example for this claim. I don’t judge the software here as such, in my opinion, it’s rather about the documentation. As a teaser, you might wonder what
mod_autoindex generates by default? This is what get generated for a folder containg just a file and just a subfolder:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head><title>Index of /js</title></head> <body> <h1>Index of /js</h1> <ul><li><a href="/"> Parent Directory</a></li> <li><a href="file"> file</a></li> <li><a href="folder"> folder</a></li> </ul> </body> </html>