Apache 2.0.36 and vhosts
Posted by: sTimulated (---.plus.com)
Date: October 11, 2015 11:44AM

Is this the right format for my vhosts?
Using apache 2.0.36,php is 5.3.4 and mysql is 5.5.24

<VirtualHost *:80>
DocumentRoot "c:/wamp/www/stimulatedgaming/Forum"
ServerName www.stimulatedgaming.com/Forum
ServerAlias stimulatedgaming.com/Forum *.stimulatedgaming.com/Forum
ErrorLog C:/wamp/www/stimulatedgaming/Forum/logs/sTG_Forum_error.log
CustomLog C:/wamp/www/stimulatedgaming/Forum/logs/sTG_Forum_access.log common
<Directory "c:/wamp/www/stimulatedgaming/Forum">
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>

Options: ReplyQuote
Re: Apache 2.0.36 and vhosts
Posted by: sTimulated (---.plus.com)
Date: October 21, 2015 12:29PM

I know they are old versions but I have things that don't work with the newer versions.
Plus I also have a php4 installed and in use.

Options: ReplyQuote
Re: Apache 2.0.36 and vhosts
Posted by: RiggsFolly (---.as43234.net)
Date: October 21, 2015 02:43PM

I assume something is wrong which is why you ask this question.

If you let us know what is actually the problem we may be able to be of more assistance.

If that is your complete httpd-vhost.conf file then here are some initial suggestions


1. You need a 'NameVirtualHost' at the top of the file
NameVirtualHost *:80


2. In order to keep `localhost` working and to provide a little security I would also add this as the first vhost definition in that file

# Should be the first VHOST definition so that it is the default virtual host
# Also access rights should remain restricted to the local PC 
# so that any random ip address attack will recieve an error code and not gain access

<VirtualHost *:80>
    DocumentRoot "c:/wamp/www"
    ServerName localhost
    <Directory  "c:/wamp/www">
    	AllowOverride All
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.0 localhost
    </Directory>
</VirtualHost>

3. If you are trying to create a sub domain, you had better say so as there is more to this than meets the eye initially, and you will need to amend DNS records as a browser has to be able to resolve the subdomain name from your DNS!

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Apache 2.0.36 and vhosts
Posted by: sTimulated (---.plus.com)
Date: October 22, 2015 01:30PM

No problems that I can see but I've seen a few posts where it is a different format depending on which version of apache your using.
so just wanted to check I use the correct format for my older version.

my 1st line is.....

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "c:/wamp/www/stg2142"
ServerName localhost
ErrorLog C:/wamp/www/logs/error.log
CustomLog C:/wamp/www/logs/access.log common
<Directory "c:/wamp/www/stg2142">
AllowOverride All
Order Allow,Deny
Allow from 127.0.0.1 localhost
</Directory>
</VirtualHost>

My root and directory are different because this is the only way my 'ranking software' works.
The other 3 are the same as the 1st post,with different addresses of course.

Options: ReplyQuote


Sorry, only registered users may post in this forum.