Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Virtualhost + Apache2 + OSC2.2 MS2


fmarsch

Recommended Posts

I am trying to use virtual hosting so I can host mulitple domains on my webserver. I have the Apache2Triad installed on my server and I use OSC 2.2 MS2.

 

The virtual hosting seems to be directing to the correct directory, but non of the images are loading, the page is not being displayed correctly, and the stylesheet is not loading as well.

 

NameVirtualHost *

 

#

# 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 *>

#    ServerAdmin [email protected]

#    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>

 

<VirtualHost *>

DocumentRoot c:/apache2triad/htdocs

ServerName www.norseconcepts.com

ServerAlias *.norseconcepts.com norseconcepts.com

</VirtualHost>

 

<VirtualHost *>

DocumentRoot c:/apache2triad/htdocs/catalog

ServerName www.norsemachines.com

ServerAlias *.norsemachines.com norsemachines.com

</VirtualHost>

 

Any help would be greatly appretiated.

Link to comment
Share on other sites

You need to ammend the htpd.conf file in Apache to get mutiple "local hosts" something like this

 

# Use name-based virtual hosting.

#

#NameVirtualHost *

 

#

# 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.

 

 

Listen 80

Listen 8080

<VirtualHost 127.0.0.1:8080>

ServerAdmin [email protected]

DocumentRoot C:\WebSites\Hornall

</VirtualHost>

 

Listen 80

Listen 8090

<VirtualHost 127.0.0.1:8090>

ServerAdmin [email protected]

DocumentRoot C:\WebSites\SiteA

</VirtualHost>

 

(this is from my own set up...I run about a dozen sites in Apache and one in IIS on the same machine with no hiccups

I have a gap of 10 for no good reason apart from the fact is is easy to remember

To look at the sites in your browser you would look at e.g. 127.0.0.1:8080/

 

I hope that helps you out

 

Steve

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...