Jump to content
The Uniform Server Community

Apache serves Index of/


Recommended Posts

I have set up two directories in www which reflect two domains I have.

The directories hold a simple hello world page ( one index HTML mad one index.php)

I set these up on uniform server z to test access as I have previously had problems getting virtual host to work on coral 6.8

I can test the IP address fine and ping the sever.

I can access the two addresses from the net (not on my local network)

How ever when I access the either site I get the Index of/

My DirectoryIndex in the main apache config allows index.php & index.html.

I also have that in the .htaccess.

Long explanation but is this a question of setting up virtual hosts or is there other things to check first?

Any help appreciated.

Link to comment
Share on other sites

I assume the two domains you have represent two separate websites.

These need to be configured using VHosts. The www folder then becomes redundant more specifically becomes the default site if either the two sites cannot be resolved.


Setting up and configuring Vhosts, takes just a few mouse clicks, for details refer to the following documentation section Create Apache Vhost additional information is found on this page Apache Vhosts


All the best


Link to comment
Share on other sites

You now get a 403 forbidden error however did not state if this is for local or external (Internet) access. I am assuming its for Internet access, edit each .htaccess file in each Vhost root folder as follows:


Comment out the lines as shown:


#Order Deny,Allow

#Deny from all

#Allow from

#Allow from ::1


This allows access from the Internet.


All the best


Link to comment
Share on other sites

Hi Ric,

Yes external access.

Commented out Vhosts fine, but now get index of/ for each site.

apache config has Directory Index for index.html and index.php which are the two test pages which just say Hell World. Thes show on localhost Ok.

I put DirectoryIndex index.html index.php into the .htaccess files but still get index of/

Any suggestions?


Link to comment
Share on other sites

I have established that I am not getting an index of each web folder but of the Vhost folder for the website.

As an experiment I changed the icon in the VHosts file and now that icon shows if I open the link in the index, which I guess means that the Directory being shown is the VHosts.

The path is C:\Uniserver\vhosts\hawkesleypublishingsolutions and similarly for the second site.

This is the the http- vhost file


# Virtual Hosts
# Required modules: mod_log_config
# 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
# for further details before you try to setup virtual hosts.
# You may use the command line option '-S' to verify your virtual host
# configuration.
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
# First Virtual Host must be a shallow duplicate of the main host
# in httpd.conf
<VirtualHost _default_:${AP_PORT}>
DocumentRoot ${US_ROOTF_WWW}
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
<VirtualHost *:${AP_PORT}>
ServerAdmin webmaster@hawkesleypublishingsolutions.com
DocumentRoot ${US_ROOTF}/vhosts/hawkesleypublishingsolutions
ServerName hawkesleypublishingsolutions.com
ServerAlias www.hawkesleypublishingsolutions.com *.hawkesleypublishingsolutions.com
ErrorLog logs/hawkesleypublishingsolutions.com-error.log
CustomLog logs/hawkesleypublishingsolutions.com-access.log common
<Directory "${HOME}\vhosts\hawkesleypublishingsolutions">
Options Indexes Includes
AllowOverride All
Require all granted
<VirtualHost *:${AP_PORT}>
ServerAdmin webmaster@somewhere4u.com
DocumentRoot ${US_ROOTF}/vhosts/somewhere4u
ServerName somewhere4u.com
ServerAlias www.somewhere4u.com *.somewhere4u.com
ErrorLog logs/somewhere4u.com-error.log
CustomLog logs/somewhere4u.com-access.log common
<Directory "${HOME}\vhosts\somewhere4u">
Options Indexes Includes
AllowOverride All
Require all granted
Any thoughts?
Link to comment
Share on other sites


Could this be an issue with these two variables ${US_ROOTF} and ${HOME}

Where are these set so I can check them please.

Also ServerName${US_SERVERNAME}

I have not set a Server Name as it is my home server.The Ip is dynamic but managed by NO-IP which seems to work fine.

If anybody can help em with this please respond as I have to get this site working for a forthcoming birthday.

Many thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...