Virtual Hosts conf disables apache (solved)
Posted by: cjeung (---.hsd1.ca.comcast.net)
Date: August 21, 2014 03:36AM

My original posting was so long that I put my fix first. Admins feel free to delete posting if you feel it's appropriate. Some action caused windows 7 to alter the privileges to my folder stream. Thus locking out the virtual access. At least for the local host. I haven't tried my LAN acces problem yet

Cheers


Firstly, I am working on a fresh install of the current versions. I had the "green icon" with virtual host definitions, only on the localhost machine. I was getting 403 forbidden errors over my LAN with networked computers. I don't have WAN access. My OS is Windows 7.

I had moved my Virtual host locations to an alternate drive in my host computer. (WAMP/www on drive H:, Virtual Host files on drive g:/My Documents/webdev). There was no change to my accessibility (local host good, 403 on LAN).

I applied a shared definition on the webdev folder, and here is where things blew up, got worse, what have you. I lost the "green icon" upon restarting all services. I tried to undo the shared definitions on the webdev folder and no change. still no green icon.

After much mucking about, I decided on a fresh re-install since I am still trying to sort out the configurations. I re-did all my steps from the first install using the stickies found here (riggsfolly is a great assett). when it came to rewriting my virtual host definitions other than local host, I could not get the "green". I discovered that to get the "green" i needed to write the definition as My_Documents. However, I then got 404 forbidden errors.

Thus I tried to move all virtual folders to g:/webdev, now out of the My_Documents heirarchy. I re-wrote the virtual host definitions. To my mystification, any non localhost definition prevents the apache server from starting.

And here, is where I need help

thanks



Edited 1 time(s). Last edit at 08/21/2014 08:55PM by cjeung.

Options: ReplyQuote
Re: Virtual Hosts conf disables apache (solved)
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 22, 2014 10:31AM

Firstly you do not need to change/add any windows shares to get this to work.

You actually control who ( i.e. what ip addresses ) can access Apache with this command "Require local" and other like it.

This specific command tells Apache it may only accept connections from 'local' which means '127.0.0.1 & ::1 & localhost'

So if you want to tell Apache that it may accept connections from PC's on your internal network you have to add to that statement like so :-

    Require local
    Require ip 192.168.1

Assuming your internal network is running on this subnet i.e. 192.168.1 that will tell Apache to allow any PC on your network to connect.

If you are not sure what subnet your router is configure to do this from a command line :-

ipconfig
and in the output look for this line
   IPv4 Address. . . . . . . . . . . : 192.168.2.11

Mine is configured to run subnet 192.168.2 so change the above command to fit your actual subnet

There are all sorts of other clever ways to do it but this is the simplest see [httpd.apache.org]


If you are still confused, post your Virtual Host definitions & your subnet ip and I will suggest some amendments.

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



Edited 1 time(s). Last edit at 08/22/2014 10:50AM by Otomatic.

Options: ReplyQuote
Re: Virtual Hosts conf disables apache (solved)
Posted by: cjeung (---.pools.spcsdns.net)
Date: August 22, 2014 05:17PM

Yes that helps.

However now i am getting 404 errors with only my Virtual definitions that are on alt drives (not wamp/www). I can access them through the host computer.

Is there anyway to get that fixed without having to edit the Hosts file on all the network computers? I don't recall it being necessary with apache 4.2 and I was able to access using mobile devices. Why would the URL of 192.168.1.xxx/gotocj.dev return 404, yet the hosts addition work?

Options: ReplyQuote
Re: Virtual Hosts conf disables apache (solved)
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 22, 2014 06:49PM

Lets see your virtual hosts definitions

I imagine you have not told apache that local network ip's can access those.

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


Sorry, only registered users may post in this forum.