Swamped by WAMP
Author
Discussion

Penelope Stopit

Original Poster:

11,209 posts

140 months

Monday 2nd July 2018
quotequote all
I have installed Apache, MySQL and PHP using WAMP
Now I have added Ampache to the WAMP www folder and installed it without problems
I can now get to the Ampache login page by typing this 192.168.1.2/ampache or localhost/ampache into my browser address bar

I am now testing Virtual Hosts

When I edit the "C:\wamp64\bin\apache\apache2.4.33\conf\extra\httpd-vhosts.conf" file by changing the below from

this

  1. Virtual Hosts
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

to this

  1. Virtual Hosts
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "C:/wamp64/www"
<Directory "C:/wamp64/www/ampache">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require All Granted
Require ip 192.168.1.1
Require ip 192.168.1.2
Require ip 192.168.1.3
Require ip 192.168.1.4
Require ip 192.168.1.5
Require ip 192.168.1.6
</Directory>
</VirtualHost>

which shows I have added the Document Root and Directory paths plus changed "Require local" to "Require All Granted" and also added a list of possible local IP's

WAMP is broken by my above edit......it changes from red to orange but doesn't go green

When it first did this it would show me directory path problems, I sorted the paths and they are now good

I'm doing this to test serving music and video to computers around the house

Has anyone any ideas as to why I have broken it with the above edit

Thank you in advance

Edited by Penelope Stopit on Monday 2nd July 14:46

TonyRPH

13,555 posts

199 months

Monday 2nd July 2018
quotequote all
Try


<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "C:/wamp64/www"
<Directory "C:/wamp64/www/ampache">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all denied
Require ip 192.168.1.1/24 192.168.1.2/24 192.168.1.3/24 192.168.1.4/24 192.168.1.5/24 192.168.1.6/24
</Directory>
</VirtualHost>


I'm also fairly certain that it should be: Require ip 192.168.1.1/24 192.168.1.2/24 192.168.1.3/24 * (see edit below)

But personally I'd just put: Require ip 192.168.1.0/24

Which would permit the entire 192.168.1.0/24 network (unless you have reasons for limiting it otherwise)

  • edit
I have changed my reply as per above.

You most likely don't need the "/24" (assumes a subnet mask of 255.255.255.0) AND if you;re using a different subnet mask, you will indeed need to adjust that parameter.



Edited by TonyRPH on Monday 2nd July 21:33

Penelope Stopit

Original Poster:

11,209 posts

140 months

Monday 2nd July 2018
quotequote all
TonyRPH said:
Try


<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "C:/wamp64/www"
<Directory "C:/wamp64/www/ampache">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all denied
Require ip 192.168.1.1/24
Require ip 192.168.1.2/24
Require ip 192.168.1.3/24
Require ip 192.168.1.4/24
Require ip 192.168.1.5/24
Require ip 192.168.1.6/24
</Directory>
</VirtualHost>


I'm also fairly certain that it should be: Require ip 192.168.1.1/24 192.168.1.2/24 192.168.1.3/24

But personally I'd just put: Require ip 192.168.1.0/24

Which would permit the entire 192.168.1.0/24 network (unless you have reasons for limiting it otherwise)
I can't thank you enough for this.
Having edited the file to match your above text and using your personal choice of Require ip 192.168.1.0/24, the server now shows green and I was then able to reach my desktop ampache from a laptop that was using IPV4 192.168.1.3

I did my best in trying to solve this problem but had to give up on it, I read many articles yet none of them showed what you have posted here

Require All Granted came from one article yet you have me up and running with Require all denied

Nowhere did I read about /24

Thank you very much TonyRPH. Send me the bill


Edited by Penelope Stopit on Monday 2nd July 21:36

TonyRPH

13,555 posts

199 months

Monday 2nd July 2018
quotequote all
Please see my edits to my previous post.

Also - you have to Deny access before granting access - hence the "Require all denied".


Penelope Stopit

Original Poster:

11,209 posts

140 months

Monday 2nd July 2018
quotequote all
TonyRPH said:
Please see my edits to my previous post.

Also - you have to Deny access before granting access - hence the "Require all denied".
Ok we had crossed posts but I think all is well with what you first suggested, see image, thank you for sharing your knowledge with me



TonyRPH

13,555 posts

199 months

Monday 2nd July 2018
quotequote all
Penelope Stopit said:
<snip>
Nowhere did I read about /24
<snip>
Read the documentation here about using subnet masks.

Also go back and re read my original post - you'll see that you can place multiple IPs on the same line, instead of "Require ip x.x.x.x" line by line.

/24 is CIDR notation for 255.255.255.0

Take a look at this page which goes some way to explaining about CIDR and subnet masks.




Penelope Stopit

Original Poster:

11,209 posts

140 months

Tuesday 3rd July 2018
quotequote all
TonyRPH said:
Penelope Stopit said:
<snip>
Nowhere did I read about /24
<snip>
Read the documentation here about using subnet masks.

Also go back and re read my original post - you'll see that you can place multiple IPs on the same line, instead of "Require ip x.x.x.x" line by line.

/24 is CIDR notation for 255.255.255.0

Take a look at this page which goes some way to explaining about CIDR and subnet masks.
This is all very interesting to a novice like me, ok...It's not rocket science as it is far more complicated but I have gained some knowledge from the links you posted me and will revisit them shortly
Thank you for all your input, I have benefitted much from it. Do you know how frustrating these problems are to a novice? There was no screaming or punching the monitor but....