Taorluath Posted June 12, 2008 Share Posted June 12, 2008 If you're doing anything with Apache, everyone says to edit you httpd.conf file. However, my /etc/apache2/httpd.conf is remarkably empty. This is the entire content: ServerName localhost <Directory /www/htdocs/yoursite> AllowOverride FileInfo </Directory> I've never even had a site at /www/htdocs/yoursite! However, my /etc/apache2/apache2.conf is much more full. This is the beginning bit: # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.2/ for detailed information about # the directives. The apache2.conf file seems to be the one that operates, since I changed the 'ServerTokens Full' line to 'ServerTokens Major' and it worked. Why is it called apache2 for me, when for everyone else it's httpd?? Also, I've heard that taking out 'Indexes' from <Directory "/var/www/html"> Options Indexes FollowSymLinks </Directory> will make it so people can't see all the files in my directory. So I added this to the end of my apache2.conf: <Directory "/home/server/mysite"> Options FollowSymLinks </Directory> But it still displays all the files in any directory! How do I fix this? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 12, 2008 Share Posted June 12, 2008 Make sure you have restarted Apache after making the changes. As for why your httpd.conf is called apache.conf it is most probably do with how your linux distro installs/sets up Apache. Any directives you apply in httpd.conf will override those set in apache.conf Quote Link to comment Share on other sites More sharing options...
trq Posted June 12, 2008 Share Posted June 12, 2008 Why is it called apache2 for me, when for everyone else it's httpd?? This really depends on how Apache has been configured, either by you or your distro. For instance, Debian uses the same /etc/apache2/apache2.conf file as its main configuration, but if you look within that file there is a line that reads.... /etc/apache2/apache2.conf And this is where you ought store changes that you make. Are you using Debain or a derivative? As for your question, you need to remove the Indexes directive from the place where your site is actually defined. Quote Link to comment Share on other sites More sharing options...
Taorluath Posted June 13, 2008 Author Share Posted June 13, 2008 Are you using Debain or a derivative? Yeah, I'm using Xubuntu, so that makes sense. As for your question, you need to remove the Indexes directive from the place where your site is actually defined. Ok, now I get it, I found the file you're talking about. It's in /etc/apache2/sites-enabled. Thank you guys so much for the help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.