PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 21, 2022

[FIXED] How can i setup my wamp server to access to a virtual Host from intranet?

 September 21, 2022     apache, php, virtualhost, wamp, wampserver     No comments   

Issue

I have some virtual-host and I can access it on the PC that has the server intalled. But I have others Pc and I want to access via the domain name.

I just can access to the server configuration page changing the statement "Require local" to "Require all granted". This only allow me to access through the ip address.

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot D:/wamp64/www
    <Directory  "D:/wamp64/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName laravel5.1.app
    DocumentRoot "d:/wamp64/www/laravel5_1/public"
    <Directory  "d:/wamp64/www/laravel5_1/public/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Solution

To access the site using your domain names you must tell each of the other PC's where to find the domain name.

So you either need a local DNS Server or you edit the HOSTS file on each PC that you want to access the site from by adding something like this to the other PC's HOSTS

192.168.1.100 laravel5.1.app

Assuming your WAMPServer (Apache) is running on ip address 192.168.1.100



Answered By - RiggsFolly
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing