Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having problems with setting up Apache2 server. I must say I'm completely a newbie. I'd be gladfull if you could help me.

  1. What's the best of way organizing Apache2 config files? I'm using Debian Lenny, and there are a lot of config files(apache2.conf, httpd.conf, ports.conf, sites-available etc...) in different places and I find it quite difficult to set up.

  2. I want to access to phpmyadmin and some other administrator softwares(ISPConfig etc) via subdomain(for example;, but I want this subdomain to be accessible only via ssh so I've tried the following and some other examples that I've found on the internet for phpmyadmin (phpmyadmin.conf) but it's not working.

<Directory /usr/share/phpmyadmin>
AllowOverride None
Order deny,allow 
Deny from all
Allow from
share|improve this question

On Debian you should organise your configuration files as Debian expects you to, the most important thing in this case for you is going to be the VirtualHosts.

These should go in sites-available as individual files (with one or more VirtualHosts per file). You can then enable the VirtualHost with a2ensite.

To make a site only available via SSH I usually make a VirtualHost that only listens for connections to localhost, eg:

<VirtualHost *:80>
ServerName localhost

DocumentRoot /var/www/html/

<Directory /var/www/html/>
    Allow from
    Deny from all
    Options FollowSymLinks Indexes
    AllowOverride None
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.