LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-01-2005, 02:16 AM   #1
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
apache help


I figured out how to start it (httpd). I got rid of the default page and placed some of my own in /var/www/html/. The problem is that is someone types http://myip/ it will come up with the browse list. In IIS there is an ordered list of documents that it looks for first. For example, I have index.html. Apache should process that instead of listing the dir contents. How do I change this one?

Thx
 
Old 11-01-2005, 02:21 AM   #2
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
You're looking for DirectoryIndex, by default it probably looks something like:

DirectoryIndex index.html index.html.var

Just add your index pages there, the priority goes from left to right (so if index.html doesn't exist, it looks for index.html.var in the above example)
 
Old 11-03-2005, 08:14 AM   #3
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
To disable the listing of your dir content, search for the option DirectoryListing in httpd.conf
 
Old 12-31-2005, 06:17 AM   #4
Sapient
Member
 
Registered: Oct 2003
Location: San Luis Obispo, CA
Distribution: SuSE
Posts: 196

Rep: Reputation: 30
I have this same issue and my DirectoryListing looks like this.

DirectoryIndex index.html index.html.var
 
Old 12-31-2005, 06:55 AM   #5
Sapient
Member
 
Registered: Oct 2003
Location: San Luis Obispo, CA
Distribution: SuSE
Posts: 196

Rep: Reputation: 30
What owner and group should the Apache config files be in. Mine are root / root. Could this cause the problem?
 
Old 12-31-2005, 08:12 AM   #6
Sapient
Member
 
Registered: Oct 2003
Location: San Luis Obispo, CA
Distribution: SuSE
Posts: 196

Rep: Reputation: 30
Thought I should post this here also.


I got this working, however, it does not solve the problem.


Situation:

The http.conf calling the default-server.conf which in turn calls the define mind-hosts.conf. I have posted the content of each file except for the http.conf which is for the most part default.
In this mess there has to be a reason why the url without the index.html is showing my directory listing.


Examples:

DEFAULT-SERVER.CONF

#
# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.
#

DocumentRoot "/srv/www/htdocs/hingedmind"
<Directory "/srv/www/htdocs/hingedmind">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Alias /icons/ "/usr/share/apache2/icons/"

<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<IfModule mod_userdir.c>
UserDir public_html
Include /etc/apache2/mod_userdir.conf
</IfModule>

ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
<Directory "/srv/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>

Include /etc/apache2/conf.d/*.conf
Include /etc/apache2/vhosts.d/mind-hosts.conf

# The manual... if it is installed ('?' means it won't complain)
Include /etc/apache2/conf.d/apache2-manual?conf
# YaST auto define section
<IfDefine SSL>
SSLEngine off
</IfDefine>



MIND-HOSTS.CONF


<VirtualHost *:80>
ServerAdmin sapient@hingedmind.com
ServerName www.hingedmind.com

DocumentRoot "/srv/www/htdocs/hingedmind"

ErrorLog /var/log/apache2/hingedmind-error_log
CustomLog /var/log/apache2/hingedmind-access_log combined

HostnameLookups On

UseCanonicalName Off

ServerSignature On

Include /etc/apache2/conf.d/*.conf

<IfModule mod_userdir.c>
serDir public_html
Include /etc/apache2/mod_userdir.conf
</IfModule>


<Directory "/srv/www/htdocs/hingedmind">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 07:28 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration