1

I'm developing a web page and I'm using WAMP which is installed on my disk "C:". Now I just want to put it on the server of the company. To make it accessible from all users of my intranet.

enter image description here

Can you explain me the steps I need to do?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Booba__2012
  • 143
  • 1
  • 3
  • 14
  • I know this is an old post, put +1 for the graphic alone... that is awesome. We don't draw on paper and snap a photo and upload around here... no... we stay digital and open up paint :-) – Phlume Aug 08 '20 at 23:37

1 Answers1

3

Yes its quite easy.

I am assuming you are using WAMPServer, but if you are using another WAMP setup the basic concept still applies, just the file locations and httpd.conf file contents may look a little different

First you need to know your subnet so, start by opening a command window and run

ipconfig

Look at the output and under this heading

Ethernet adapter Local Area Connection:

Look for this line

IPv4 Address. . . . . . . . . . . : 192.168.2.11

and remember the first 3 of the 4 quartiles, so in thsi example I would remember 192.168.2


Now, edit the httpd.conf file ( using the menu links from the wampmanager icon )

Find the section in there that starts with this line

<Directory "c:/wamp/www/">

Within that section you should find something like this if you are using Apache 2.2.x

#   onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1

Or this if you are using Apache 2.4.x

#   onlineoffline tag - don't remove
Require local

You now need to add another instruction to this to tell Apache it is allowed to accept connections from other ip addresses

So if you are using Apache 2.2.x change it to this

#   onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
Allow from 192.168.2

Or this if you are using Apache 2.4.x

#   onlineoffline tag - don't remove
Require local
Require ip 192.168.2

Because you have used just the first 3 of the 4 quartiles of the network subnet all PC who have an ip address starting with 192.168.2 will be allowed to access Apache.

You can add more of these Allow or Require lines as you like when someone from another subnet within you company want to access your server.

As you are on a company network your subnet may start with 10.x.y.z. If you wanted the whole company to be allowed access you could use just Require ip 10 for example to give access to everyone inside your company network.

If you have created a Virtual Host for the site you want people to access, and I would recommend you do, you should make these access changes within the Virtual Hosts definition and not in the httpd.conf file.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • Thank you very much for your explanation ^^ But I found an easy way to do it with WAMP. You just do a left-click on the WAMP logo, then do "put online". After that, all PC had acces to the page by putting my local IP address in the url bar :D – Booba__2012 Aug 01 '14 at 10:51
  • Yes thats true, but if there is a way into your company network from the internet the world will also be able to see your website, as that simple click changes Apache security to `Allow from all` or `Require all granted` depending on Apache version. Are you sure you want to take that risk????? Will your company network always be secure. If no access is available from the internet today, are you sure that will be the case in a month, or a year??? – RiggsFolly Aug 01 '14 at 10:54
  • I'm not a newtork pro soo I don't really understand you :p But I will try your tuto because you really take time to explain me in all details and all ^^ Soo thank you again:D – Booba__2012 Aug 01 '14 at 11:14
  • Thank for your clear explanation, it helped me, I have question how can I allow access to only one specific website. I'm using Apache 2.4.9. Thank you – nermiiine Aug 03 '17 at 16:31
  • @nermiiine You should create a Virtual Host and then set the access permissions on that specific Virtual Host [see this answer for help](https://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618) – RiggsFolly Aug 03 '17 at 17:18