Question

apache with subdomain not working any longer

Asked by: vkimura2007

Hi,

I'm having some problems with apache and the subdomains I created. This was working previously but I haven't tested my subdomains in awhile.

In my httpd.conf I have:

<VirtualHost *:80>
# DocumentRoot /www/example1
# ServerName www.example1.com
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira"
ServerName roth-ira
# Other directives here
</VirtualHost>

My host file is fine. I havne't touched it. I restarted apached through windows services. I have Windows Vista Home Premium.

http:localhost works fine.

Any clues?

vkimura

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-28 at 02:44:17ID24766288
Tags

apache subdomain

Topics

Adobe Flash

,

Apache Web Server

Participating Experts
2
Points
500
Comments
45

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Subdomain / DNS / Apache
    Hi, I have a Redhat 6.0 installation in a local network. I'd like to have a virtual web server - a subdomain - like http://test.my_linux_box I think I know how to do this in apache, but where should I define the DNS name? I thought adding this to local /etc/hosts would b...
  2. subdomain handling with apache
    I have one IP address and a top level domain. "mysite.com" I have the rights to put subdomains uder this top level domain, like "qqq.mysite.com" I thought that this is a virtual hosting question and I tried to use apache virtual hosting in the httpd.conf ...
  3. httpd.conf virtualhost configuration.
    I am running RH7.3 with apache 1.3.23-11. I am having a bear of a time trying to configure VirtualHosts. I was wondering if someone had a complete and working httpd.conf file that supports 2 or more virtual hosts that they could share with me. My Objectives: Host at least...
  4. Apache, Subdomains, & PHP Configuration
    Good day: I've recently switched a dedicated server solution which uses Plesk 7.5, and I seem to be having an issue getting items set up correctly. Nearly everyone on the server requires that .html files be parsed as PHP, so we configured Apache to handle this using the fo...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: giltjrPosted on 2009-09-28 at 18:47:06ID: 25445357

I'm not sure what you mean by sub-domains, but what you have coded is a just a plain host name.  Based on what you have coded I would expect that you would need to enter:

    http://roth-ira

and have a hosts file entry that has the host name roth-ira resolve to the IP address you are running Apache on.

 

by: yfastudPosted on 2009-09-28 at 19:02:53ID: 25445411

if you access your site from outside, check your port forward in router

to setup access, follow this
http://blog.jlbn.net/?p=21

to setup dns, follow this
http://blog.jlbn.net/?p=28

to setup vh, follow this
http://blog.jlbn.net/?p=23

 

by: vkimura2007Posted on 2009-09-29 at 04:08:22ID: 25447580

Hi giltjr,

I had the subdomain accessible at http://roth-ira.localhost/
but it's not resolving.

The host file has:
127.0.0.1      roth-ira.localhost

I'm developing on my laptop so I'm accessing from the outside.

 

by: giltjrPosted on 2009-09-29 at 05:17:53ID: 25448007

You need to have the sever name set to roth-ra.localhost or have an alias set to roth-ra.localhost.

 

by: vkimura2007Posted on 2009-09-30 at 15:34:28ID: 25464312

Hi giltjr

This is what I have in my apache httpd.conf file:

<VirtualHost *:80>
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira"
ServerName roth-ira.localhost
</VirtualHost>

I restarted apached. I placed an index.html in the folder roth-ira. Then I browsed to http://roth-ira.localhost. This is what I receive:

Bad Gateway
The following error occurred:
[code=DNS_HOST_NOT_FOUND] The host name was not found during the DNS lookup. Contact your system administrator if the problem is not found by retrying the URL.

--------------------------------------------------------------------------------
Please contact the administrator.

 

by: giltjrPosted on 2009-09-30 at 17:08:49ID: 25464969

What happens if you try and ping roth-ira.localhost?

 

by: vkimura2007Posted on 2009-10-02 at 15:26:29ID: 25482788

It pings
http://tutorialref.com/images/ping-localhost.png

I tried ping localhost and noticed the return was:
Reply from ::1:

But the ping roth-ira.localhost return was:
Reply from 127.0.0.1:1

I don't know if that gives a clue as to the cause of the problem though.

 

by: giltjrPosted on 2009-10-02 at 16:41:50ID: 25483093

Umm, it looks like you might have IP V6 enabled.  Try disabling it, unless you really need it.

 

by: vkimura2007Posted on 2009-10-05 at 16:38:59ID: 25500879

It's not enabled. Any other suggestions?

 

by: giltjrPosted on 2009-10-05 at 18:31:49ID: 25501257

Issue the command ipconfig /all

With IPV6 enabled you will get IP addresses that have colons in them.  

 

by: vkimura2007Posted on 2009-10-09 at 21:13:06ID: 25540810

I don't have colons in the ips. A screenshot:

http://tutorialref.com/images/ipconfig-all-ipv6.png

I'm at a loss. I'll keep investigating though. It's so strange because it WAS working previously. I have no idea what I inadvertently changed

 

by: giltjrPosted on 2009-10-10 at 03:44:41ID: 25541743

In your previous reply showed you got results from  "::1", that is not a valid IP V4 address, which could be your problem.

You need to find out where that is coming from.

Do you have "::1 localhost" in your hosts file?  If so remove it and see if that resolves your problem.  

 

by: vkimura2007Posted on 2009-10-13 at 00:02:16ID: 25557524

Hi giltjr,

You're right. I don't know how that got in there. So I commented the line out. This is in my hosts file:

127.0.0.1       localhost
#::1             localhost
127.0.0.1      roth-ira.localhost
#127.0.0.1      localhost2
#127.0.0.1      ftp://ftp.test
127.0.0.1      university-of-miami.localhost

I restarted Apache. I still receive the 502 Bad Gateway:
http://tutorialref.com/images/502-bad-gateway-localhost-subdomain.png

I'm thinking it has something to do with my httpd.conf file. I have this in one of the VirtualHost:
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

#
# AccessFileName: The name of the file to look for in each directory
# for access control information. See also the AllowOverride directive.
#
AccessFileName .htaccess

<VirtualHost *:80>
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira"
ServerName roth-ira.localhost
</VirtualHost>

Is there anything in my httpd.conf that you could think of that could be displaying the 502 Bad Gateway. It's not resolving in the browser yet I can ping roth-ira.localhost and I can ping localhost.

Thank you for your help.

 

by: giltjrPosted on 2009-10-13 at 06:01:37ID: 25559366

I beleive that this is caused by Apache attempting to lookup a host name that is not valid.

You may want to look at your Apache logs to see if it shows what host name it is trying to lookup.

 

by: vkimura2007Posted on 2009-10-13 at 06:27:14ID: 25559588

In my error logs I have this at the end but I don't see any reference to the 502 error:
[Sat Oct 10 04:37:14 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/securimage, referer: http://localhost/bestirarescue/trunk/roth-ira/can-i-contribute-to-both-a-401k-a-roth-ira.php
[Sat Oct 10 04:37:14 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/images, referer: http://localhost/bestirarescue/trunk/roth-ira/can-i-contribute-to-both-a-401k-a-roth-ira.php
[Sat Oct 10 05:45:19 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/images, referer: http://localhost/bestirarescue/trunk/roth-ira/can-i-contribute-to-both-a-401k-a-roth-ira.php
[Sat Oct 10 05:45:20 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/images, referer: http://localhost/bestirarescue/trunk/roth-ira/can-i-contribute-to-both-a-401k-a-roth-ira.php
[Sat Oct 10 05:45:20 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/images, referer: http://localhost/bestirarescue/trunk/roth-ira/can-i-contribute-to-both-a-401k-a-roth-ira.php
[Sat Oct 10 05:45:20 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/securimage, referer: http://localhost/bestirarescue/trunk/roth-ira/can-i-contribute-to-both-a-401k-a-roth-ira.php
[Mon Oct 12 23:19:38 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/favicon.ico
[Mon Oct 12 23:19:39 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/favicon.ico
[Mon Oct 12 23:19:39 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira/favicon.ico
[Mon Oct 12 23:20:23 2009] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Oct 12 23:20:23 2009] [notice] Child 2372: Exit event signaled. Child process is ending.
[Mon Oct 12 23:20:24 2009] [notice] Child 2372: Released the start mutex
[Mon Oct 12 23:20:26 2009] [notice] Child 2372: Waiting for 250 worker threads to exit.
[Mon Oct 12 23:20:26 2009] [notice] Child 2372: All worker threads have exited.
[Mon Oct 12 23:20:29 2009] [notice] Child 2372: Child process is exiting
[Mon Oct 12 23:20:30 2009] [notice] Parent: Child process exited successfully.
[Mon Oct 12 23:20:35 2009] [notice] Apache/2.2.6 (Win32) PHP/5.2.8 configured -- resuming normal operations
[Mon Oct 12 23:20:35 2009] [notice] Server built: Sep  5 2007 08:58:56
[Mon Oct 12 23:20:35 2009] [notice] Parent: Created child process 6448
[Mon Oct 12 23:20:37 2009] [notice] Child 6448: Child process is running
[Mon Oct 12 23:20:37 2009] [notice] Child 6448: Acquired the start mutex.
[Mon Oct 12 23:20:37 2009] [notice] Child 6448: Starting 250 worker threads.
[Mon Oct 12 23:20:37 2009] [notice] Child 6448: Starting thread to listen on port 80.
[Mon Oct 12 23:50:59 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
[Mon Oct 12 23:53:32 2009] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Oct 12 23:53:32 2009] [notice] Child 6448: Exit event signaled. Child process is ending.
[Mon Oct 12 23:53:33 2009] [notice] Child 6448: Released the start mutex
[Mon Oct 12 23:53:34 2009] [notice] Child 6448: Waiting for 250 worker threads to exit.
[Mon Oct 12 23:53:34 2009] [notice] Child 6448: All worker threads have exited.
[Mon Oct 12 23:53:34 2009] [notice] Child 6448: Child process is exiting
[Mon Oct 12 23:53:34 2009] [notice] Parent: Child process exited successfully.
[Mon Oct 12 23:53:36 2009] [notice] Apache/2.2.6 (Win32) PHP/5.2.8 configured -- resuming normal operations
[Mon Oct 12 23:53:36 2009] [notice] Server built: Sep  5 2007 08:58:56
[Mon Oct 12 23:53:36 2009] [notice] Parent: Created child process 13944
[Mon Oct 12 23:53:38 2009] [notice] Child 13944: Child process is running
[Mon Oct 12 23:53:38 2009] [notice] Child 13944: Acquired the start mutex.
[Mon Oct 12 23:53:38 2009] [notice] Child 13944: Starting 250 worker threads.
[Mon Oct 12 23:53:38 2009] [notice] Child 13944: Starting thread to listen on port 80.

In my access logs I have this but again no reference to the Bad gateway errors:
127.0.0.1 - - [10/Oct/2009:05:45:20 -0700] "GET /bestirarescue/trunk/roth-ira/securimage/securimage_show.php HTTP/1.1" 404 257
127.0.0.1 - - [10/Oct/2009:05:45:20 -0700] "GET /bestirarescue/trunk/roth-ira/images/commentBubble.png HTTP/1.1" 404 251
127.0.0.1 - - [12/Oct/2009:23:19:36 -0700] "GET /favicon.ico HTTP/1.1" 404 209
127.0.0.1 - - [12/Oct/2009:23:19:38 -0700] "GET /favicon.ico HTTP/1.1" 404 209
127.0.0.1 - - [12/Oct/2009:23:19:38 -0700] "GET /favicon.ico HTTP/1.1" 404 209
127.0.0.1 - - [12/Oct/2009:23:50:59 -0700] "GET /favicon.ico HTTP/1.1" 404 209
127.0.0.1 - - [12/Oct/2009:23:50:59 -0700] "GET / HTTP/1.1" 304 -

I'm not the familiar with reading logs. Do you see any clues?

 

by: giltjrPosted on 2009-10-13 at 07:04:32ID: 25560042

Well, it looks like you are running a "application."  It is possible that something inside one of the PHP scripts is trying to access a remote host and can't resolve the host name.

What I would suggest is using something like Wireshark (http://www.wireshark.org) and do a packet capture and look at what dns look-ups are being done.  Then scan the PHP scripts for that host name.

To cut down on the traffic that Wireshark captures you may want to use the capture filter:

   tcp port 53 or  udp port 53

This will only capture DNS look-ups, which will make it easier.

 

by: vkimura2007Posted on 2009-10-14 at 01:34:58ID: 25568272

Hi,

Okay, I created the filter:
http://tutorialref.com/images/wireshark-capture-options.png

and I have some output:
http://tutorialref.com/images/wireshark-info.png

I attempted to refresh and access the problem page, namely:
http://roth-ira.localhost/index.html
However, I don't see any reference to the localhost.

BTW, the index.html is a simple html page with the word 'test' in it the body. No PHP.

This works:
http://localhost/
as I receive the "It works2!" I placed the number 2 to make certain that I'm in the correct folder.

I did try again and this the second output from wireshark:
http://tutorialref.com/images/wireshark-info2.png

There is some reference to shawcable.net (my isp) but I don't think that's has anything to do with the problem.


 

by: giltjrPosted on 2009-10-14 at 04:38:47ID: 25569314

Is the Apache log from you trying to acccess the "index.html" that is just a simple "TEST" page?

Do you have two computers?  If so, try setting up roth-ira.localhost in a second computers host file pointing to the real IP address of the computer running Apache.  Then run wireshark with no filters on the computer running Apache.

Wireshark can NOT caputer traffic on the loop back address under Windows, this is why you need a second computer.

 

by: vkimura2007Posted on 2009-10-15 at 04:04:17ID: 25579228

My laptop is Vista Home Premium with Apache 2.2. The ip is 192.168.1.101.

When I access localhost from my laptop I received: It works2!

But I try to access the laptop from the Centos desktop and type in 192.168.1.101 then I simply receive the word 'test' only. It's on the same LAN going through the linksys router.

I can't access localhost from the Centos. I'm still learning Centos. Three questions:

How do I access localhost from the Centos so that it will access the apache server on my laptop vista?

Do you think there is another apache httpd.conf that is on the laptop that may be interfering with the subdomain problem? I tried to do a search but I don't see another conflicting httpd.conf file.

How comes with the Centos machine I receive a 'test' when accessing the ip 192.168.1.101?

 

by: giltjrPosted on 2009-10-15 at 04:31:50ID: 25579382

You can't access localhost from another computer, well you can but it will break stuff.

localhost is the generic host name in TCP/IP networking for "this computer".  Localhost on your CentOS computer is your CentOS computer.

What is the computer name of your Windows vista computer?  I am assuming you do not have your own DNS server setup, so what you can do is in the /etc/hosts file on your CentOS  setup an entry like

      192.168.1.101 vistcomputer

where "vistcomputer" is the computer name of your Vista Computer.

 

by: vkimura2007Posted on 2009-10-15 at 05:06:41ID: 25579580

It's strange.

I initially changed the hosts file on the centos to:
127.0.0.1 localhost3
192.168.1.101 localhost

save and restarted apache. When I visited localhost on the centos I received:
It works2!

But then I changed the hosts file on centos to:
127.0.0.1 localhost3
192.168.1.101 vkimura-PC

save and restarted apache. Then I visited vkimura-PC on the centos and I received:
test

Shouldn't I be receiving:
It works2!

as previously?

 

by: giltjrPosted on 2009-10-15 at 06:46:42ID: 25580456

Do you have a virtual host that defines the server name "vkimura-PC"?  If not, then you will get the default Apache page.

Can you post your complete httpd.conf file?

 

by: vkimura2007Posted on 2009-10-15 at 06:58:55ID: 25580565

#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
#
for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
#     which responds to requests that aren't handled by a virtual host.
#     These directives also provide default values for the settings
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
#     different IP addresses or hostnames and have them handled by the
#     same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/etc/httpd" will be interpreted by the
# server as "/etc/httpd/logs/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# Don't give away too much information about all the subcomponents
# we are running.  Comment out this line if you don't mind remote sites
# finding out what major optional modules you are running
ServerTokens OS

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
# (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/httpd"

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile run/httpd.pid

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 120

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so

#
# The following modules are not loaded by default:
#
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule asis_module modules/mod_asis.so

#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  . On HPUX you may not be able to use shared memory as nobody, and the
#    suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000;
#  don't use Group #-1 on these systems!
#
User apache
Group apache

### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client.  When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.  
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
    Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride None

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid.  This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
<IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    #
    UserDir disable

    #
    # To enable requests to /~user/ to serve the user's public_html
    # directory, remove the "UserDir disable" line above, and uncomment
    # the following line instead:
    #
    #UserDir public_html

</IfModule>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
#    AllowOverride FileInfo AuthConfig Limit
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#    <Limit GET POST OPTIONS>
#        Order allow,deny
#        Allow from all
#    </Limit>
#    <LimitExcept GET POST OPTIONS>
#        Order deny,allow
#        Deny from all
#    </LimitExcept>
#</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents.  The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig /etc/mime.types

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
<IfModule mod_mime_magic.c>
#   MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic
</IfModule>

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems.  On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
#
#EnableMMAP off

#
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
#
#EnableSendfile off

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
# requires the mod_logio module to be loaded.
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog logs/access_log common

#
# If you would like to have separate agent and referer logfiles, uncomment
# the following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent

#
# For a single logfile with access, agent, and referer information
# (Combined Logfile Format), use the following directive:
#
CustomLog logs/access_log combined

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature On

#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL.  So "/icons" isn't aliased in this
# example, only "/icons/".  If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings.  If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

#
# WebDAV module configuration section.
#
<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo http://www.example.com/bar

#
# Directives controlling the display of server-generated directory listings.
#

#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions.  These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

#
# AddDescription allows you to place a short description after a file in
# server-generated indexes.  These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing.  Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character 'Language' abbreviation is not identical to
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
# Norwegian (no) - Polish (pl) - Portugese (pt)
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
#
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW

#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-tar .tgz

#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz

# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis

#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
#  to be distributed in multiple languages.)
#
AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# Putting this all together, we can internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
# our collection of by-error message multi-language collections.  We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line:
#
#   Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /var/www/error/include/ files and
# copying them to /your/include/path/, even on a per-VirtualHost basis.
#

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>

#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#    ErrorDocument 410 /error/HTTP_GONE.html.var
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

</IfModule>
</IfModule>

#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash.  This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
#<Location /server-status>
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>

#
# Allow remote server configuration reports, with the URL of
#  http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
#<Location /server-info>
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>

#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
#<IfModule mod_proxy.c>
#ProxyRequests On
#
#<Proxy *>
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Proxy>

#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
#ProxyVia On

#
# To enable a cache of proxied content, uncomment the following lines.
# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
#
#<IfModule mod_disk_cache.c>
#   CacheEnable disk /
#   CacheRoot "/var/cache/mod_proxy"
#</IfModule>
#

#</IfModule>
# End of proxy directives.

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
#
for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

 

by: vkimura2007Posted on 2009-10-15 at 07:00:09ID: 25580577

That's the httpd.conf file from the centos.

 

by: giltjrPosted on 2009-10-15 at 07:26:16ID: 25580820

I need the httpd.conf file from which ever computer you are having the problems with the virtual host setup.

Which I beleive is the Vista box.  The config file you posted has no virtual host definitions setup, so I would assume that if you are running Apach on the CentOS box, you would only get the default Apache test page.

 

by: vkimura2007Posted on 2009-10-15 at 08:19:05ID: 25581439

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
#
for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "C:/Program Files/Apache Software Foundation/Apache2.2" will be interpreted by the
# server as "C:/Program Files/Apache Software Foundation/Apache2.2/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default.  It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#

# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
ThreadsPerChild 250
MaxRequestsPerChild  0

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
#LoadModule php5_module "C:/php/php5apache2_2.dll"
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin admin@howtomarketyourstuff.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName :80

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

#
# AccessFileName: The name of the file to look for in each directory
# for access control information. See also the AllowOverride directive.
#
AccessFileName .htaccess

<VirtualHost *:80>
# DocumentRoot /www/example1
# ServerName www.example1.com
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira"
ServerName roth-ira.localhost
# Other directives here
</VirtualHost>

<VirtualHost *:80>
# DocumentRoot /www/example1
# ServerName www.example1.com
# DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/test/trunk/small_tests/template/roth-ira"
# ServerName roth-ira.localhost

# Other directives here

</VirtualHost>

<VirtualHost *:80>
# DocumentRoot /www/example1
# ServerName www.example1.com
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/omusicstudios/trunk/university-of-miami"
ServerName university-of-miami.localhost

# Other directives here

</VirtualHost>

<VirtualHost *:80>
# DocumentRoot /www/example1
# ServerName www.example1.com
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/discoup9/trunk/tutorialref/blog"
ServerName blog-tutorial-ref.localhost
# Other directives here
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
ServerName localhost
# ServerAlias server

# Other directives here
#PHPIniDir "C:/Program Files/Zend/ZendStudio-5.5.0/bin/php5"
SetEnv PHPRC "C:/Program Files/Zend/ZendStudio-5.5.0/bin/php5/"

php_value extension_dir "C:/Program Files/Zend/ZendStudio-5.5.0/bin/php5/ext"
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .dat
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs2"
ServerName localhost2
# ServerAlias server

# Other directives here
#PHPIniDir "C:/Program Files/Zend/ZendStudio-5.5.0/bin/php5"
SetEnv PHPRC "C:/Program Files/PHP/"

php_value extension_dir "C:/Program Files/PHP/ext"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .dat
</VirtualHost>

#Listen 21
<VirtualHost *:21>

#      FTP On
#     DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
#     FTPHomeDir /
#     FTPJailUser On
#     FTPOptions CreateHomeDirs
#     FTPBannerMessage file:conf/welcome.msg

     <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
  #       AuthType Basic
  #      AuthName ftp_file_authorization
  #      AuthUserFile "C:/Program Files/Apache Software Foundation/Apache2.2/bin/userfile"
  #      Require valid-user
     </Directory>


  #    ErrorLog logs/ftp_error_log
  #   LogFormat "%u [%a] %r" cmd_log
  #    LogFormat "%{%b %e %H:%M:%S %Y}t %T %a %B %U %M %F %d %W %u %S %Z %Y" trans_log
  #   CustomLog logs/ftp_command_log cmd_log
  #   CustomLog logs/ftp_transfer_log transfer_log env=do_trans_log

</VirtualHost>



#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride all
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    #AllowOverride None
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all
</Directory>

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs2">
   Options Indexes FollowSymLinks
    AllowOverride All
    Allow from all
</Directory>

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/test/trunk/small_tests/template">
      Options Indexes FollowSymLinks
      AllowOverride All
      Order allow,deny
    Allow from all
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
</FilesMatch>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog logs/access.log common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    #CustomLog logs/access.log combined
</IfModule>

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http:///bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"

</IfModule>

#
# "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

#
# Apache parses all CGI scripts for the shebang line by default.
# This comment line, the first line of the script, consists of the symbols
# pound (#) and exclamation (!) followed by the path of the program that
# can execute this specific script.  For a perl script, with perl.exe in
# the C:\Program Files\Perl directory, the shebang line should be:

   #!c:/program files/perl/perl

# Note you _must_not_ indent the actual shebang line, and it must be the
# first line of the file.  Of course, CGI processing must be enabled by
# the appropriate ScriptAlias or Options ExecCGI directives for the files
# or directory in question.
#
# However, Apache on Windows allows either the Unix behavior above, or can
# use the Registry to match files by extention.  The command to execute
# a file of this type is retrieved from the registry by the same method as
# the Windows Explorer would use to handle double-clicking on a file.
# These script actions can be configured from the Windows Explorer View menu,
# 'Folder Options', and reviewing the 'File Types' tab.  Clicking the Edit
# button allows you to modify the Actions, of which Apache 1.3 attempts to
# perform the 'Open' Action, and failing that it will try the shebang line.
# This behavior is subject to change in Apache release 2.0.
#
# Each mechanism has it's own specific security weaknesses, from the means
# to run a program you didn't intend the website owner to invoke, and the
# best method is a matter of great debate.
#
# To enable the this Windows specific behavior (and therefore -disable- the
# equivilant Unix behavior), uncomment the following directive:
#
#ScriptInterpreterSource registry
#
# The directive above can be placed in individual <Directory> blocks or the
# .htaccess file, with either the 'registry' (Windows behavior) or 'script'
# (Unix behavior) option, and will override this server default option.
#

#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile conf/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http:///subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
#EnableMMAP off
#EnableSendfile off

# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf

# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf

# Language settings
#Include conf/extra/httpd-languages.conf

# User home directories
#Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf

# Various default settings
#Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

AcceptPathInfo on
PHPIniDir "C:/Program Files/PHP"

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
#PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

 

by: vkimura2007Posted on 2009-10-15 at 08:21:08ID: 25581463

None of the subdomains functions in the virtual hosts.

 

by: giltjrPosted on 2009-10-15 at 08:34:07ID: 25581635

Thanks.  It may take me a while to go through all of this.

 

by: vkimura2007Posted on 2009-10-15 at 09:15:48ID: 25582080

No, I thank you, giltjr, for your help. =) Thank you for your patience and help.

 

by: giltjrPosted on 2009-10-15 at 10:19:40ID: 25582617

Off hand I don't see anything wrong.  I'm going to try and use your config file on my Apache, but I need to create all of your document root directories and put a dummy index file out there.

Can you go to a command prompt and issue the following command:

    "C:\Program Files\Apache Software Foundation\Apache2.2\bin>httpd -S"


This assumes that your configuration file is really named httpd.conf.

 

by: vkimura2007Posted on 2009-10-16 at 00:04:33ID: 25587457

A screenshot of the output:

http://tutorialref.com/images/httpd-s.png

 

by: vkimura2007Posted on 2009-10-21 at 05:45:58ID: 25623333

Hi giltjr,

Just wondering if you had a chance to try the httpd.conf file on your server. Thank you for your help. =)

 

by: giltjrPosted on 2009-10-21 at 07:37:22ID: 25624401

Opps, sorry.  Yes, I did and it works fine on my PC.

What I did was create the directory for the virtual host roth-ira.localhost, localhost, and, university-of-miami.localhost.

The index.html page in each directory was a simple:

<html>
<head>
<title>
"vhostname"
</title>
</head>
<p>"vhostname"</p>
</html

where "vhostname" was the name of the virtual host.  I then added the roth-ira.localhost and university-of-miami,localhost as entries in my hosts file pointing to 127.0.0.1.

When I went to each of the URL's I got the correct page.  So your configuration is correct.

 

by: vkimura2007Posted on 2009-10-25 at 12:04:56ID: 25657718

Hi giltjr,

Can you think of anything else that could possibly be causing this problem? Thanks so much for your help by the way.

 

by: giltjrPosted on 2009-10-25 at 12:31:58ID: 25657823

O.K., I;m not sure why I did not have any problems (could be I am running a different version/level of Apache), but I have noticed a few things.

First you have virtualhost with port 21.  This is typically ftp, but you seem to be running a ftp plugin.  I would try commenting this host out to see if it makes a difference.  I doubt if it will.

Second, change the order of your 1st two virtual hosts.  You have roth-ira.local as the 1st virtualhost on port 80.  The 1st virtual host is normally your default host.  However, your second virtualhost has no severname and thus I think you want this one to be your default.

What version and level of Apache are you running.

 

by: vkimura2007Posted on 2009-10-29 at 22:31:04ID: 25700357

Hi giltjr,

I tried the suggestions. I'm beginning to think it's a router problem for some reason though I haven't unplugged my router yet. I will try this and see if this works.

 

by: giltjrPosted on 2009-10-30 at 04:33:02ID: 25701874

Try accessing the hosts from the same computer that you are running Apache on.  If you do this it should not go through the router.

 

by: vkimura2007Posted on 2009-11-02 at 15:08:21ID: 25724743

I unplugged from the Internet and using the same computer that apache is running I browsed to IE and the response is "test" but that's not in my htdocs folder. The index.html should be responding with 'It works2!'.

I'm not quite certain where the file is kept. I tried to do a search but the search comes back with several files with 'index.html'. I tried this in vista search: test index.html. I'm trying to search for the text 'test' in the contents of the file and the filename 'index.html' but I think I'm not doing something write. Do you know how to search for the text in the file's contents and search for the filename 'index.html'?

I think the router is doing something or some configuration is doing this. I'll try and rebooting and see if I receive 'It works2!'

 

by: giltjrPosted on 2009-11-02 at 17:08:51ID: 25725359

What URL did you go to?

The way the httpd.conf file you have posted should work is:

http://roth-ira.localhost should use index.html located at C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira

http://university-of-miami.localhost should use index.html located at C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/omusicstudios/trunk/university-of-miami

http://blog-tutorial-ref.localhost should use index.html located at C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/discoup9/trunk/tutorialref/blog

http://localhost should use index.html located at C:/Program Files/Apache Software Foundation/Apache2.2/htdocs

http://localhost2 should use index.html located at C:/Program Files/Apache Software Foundation/Apache2.2/htdocs2

Anyother URL that resloves to the IP address of that computer should use the index.html located at C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BestIraRescue/trunk/roth-ira

Your second VitrualHost defitnion that does not have a server name and points to C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/test/trunk/small_tests/template/roth-ira  should never be used.

 

by: vkimura2007Posted on 2009-11-07 at 05:12:52ID: 25766187

Hi giltjr,

Strange. I'm online at a hotel and all the subdomains are working. Then I tested it by disconnecting from the internet and all the subdomains are working. I think it has something to do with my router. The odd thing is when I was at home and I disconnected from the internet the subdomains were not working correctly. However, when I get home later tonight I will test it again.

I think I read on some forum where a similar subdomain problem occurred and the guy was suggesting a possible router problem. In any case, I'll test when I get home. I'll let you knoow. Thank you for all your help.

 

by: giltjrPosted on 2009-11-07 at 06:16:54ID: 25766397

If all of the host names are resolving to 127.0.0.1 then the traffic will never hit your router, it never leaves your computer.

I am also assuming that all of the host names are still resolving to 127.0.0.1.

The only way it could work when you are connected to the Internet and not work when you are disconnected is if someplace one or more of the web pages are referencing host names that are real names of hosts live on the Internet.

Which means you web pages (or server side scripts) are not referencing your ".localhost" host names.

One easy way to check is to get Fiddler2 (http://www.fiddler2.com/fiddler2/).  This will act as a proxy between your web browser and the Internet.  It will NOT show you traffic between your web browser and your computer, but if your pages refer to external hosts you will see the traffic in Fiddler.

 

by: vkimura2007Posted on 2009-11-10 at 03:53:14ID: 25784462

Hi giltjr,

Good news: it finally works! Bad news: I have no idea what I did to make it work. Actually, I think I rearranged the order of the virtualhosts and deleted one of them that was initially commented out. I'll have to confirm that by using a diff tool. I'll check on it later. Right now I have to get some sleep. I'll let you know though shortly.

But I'm wondering if I made the changes to the conf file why didn't it work before when I was in my home office and all of a sudden it began working at the hotel. I'll let you know what precisely was changed.

 

by: giltjrPosted on 2009-11-10 at 05:41:14ID: 25785207

I would have to look, the one thing I see (and have mentioned before) is that the 1st virtual host listed is the default virtual host.  Which means if Apache gets a request and it can't find a virtual host definition that matches it will use it.  Your first virtual host (and thus your default) was roth-ira.localhost.  

Then later on you had a virtual host without any server or alias name, which normally you would have first and it would be your default.

My guess is that your first definition is how the virtual host without any host name, as it should be. I think that you can also define a virtual host with the host name _default_ and it will be the default, but even that should be the 1st virtual host defined.

 

by: vkimura2007Posted on 2009-11-12 at 09:38:13ID: 25806724

I changed the order the virtual host so the 1st contained localhost and the second virtual host contained roth-ira.localhost. I think that's why it works now. I used a diff tool and that's the only difference. So this seems to have worked. But why did the older httpd.conf file work on your machine and not mine?

I'm glad it's fixed. Thanks so much for your help. You've been an awesome help.

 

by: vkimura2007Posted on 2009-11-15 at 12:31:32ID: 31634299

Thank you.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...