1

Im running a local website on a WAMP stack. This website is running in a vhost.

The website (drupal) is sometimes using a url outside de vhost which I don't want for this specific website.

How to deny access for this?

4
  • So you're saying a web page on localhost has a link to a page on an external website and you want to deny users access to the external page? If so, denying access is only possible by whoever has server access to that domain. Jun 20 '16 at 6:19
  • No it is loading information from a CDN and images from another websites url or e.g. use api's on external websites.
    – Justme
    Jun 20 '16 at 6:46
  • If there are resources in the page that are linking to other domains - you can't block those without having control on the client end. But you can change all the resources to aim at your vhost instead.
    – L Martin
    Jun 20 '16 at 8:32
  • Oke, how to change all the resources to go to my vhost ?
    – Justme
    Jun 20 '16 at 8:51
1

The easiest method would be to not open the ports on your router, since Apache operates on port 80 by default, simply do not forward that port number on your router and people won't be able to connect to it period.

3
  • Is about the connection from inside to outside. If I block this on the firewall then another tab page in the chrome browser is also blocked so this is not the solution
    – Justme
    Jun 20 '16 at 9:37
  • Sorry your very mistaken and I notice how I never mentioned the word 'Block'. You do not need to block anything. Routers use a thing called NAT and in order for traffic to be received and sent over UDP or TCP via a service a port must be opened and assigned locally, this is referred to as Port Forwarding, routers can also open ports through DMZ or through UPnP... Jun 20 '16 at 17:52
  • So, you do not need to block. You just do not forward ports, or enable either DMZ or UPnP and it becomes impossible for the outside world to access the website because your PORT 80 is not forwarded. Test it using yougetsignal.com/tools/open-ports Jun 20 '16 at 17:55
0

As I remember, WAMP blocks request from outside locahost by default. It is based on Apache configuration.

1
  • Any idea what the configuration options that control this are? Jun 20 '16 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.