WampServer 3.2.3 cant access Lan Network, - php

i cant access my wampserver machine, this is my specifications
windows 10
wampserver 3.2.3.3 64bits
Apache 2.4.46
i have edited this file "D:\Programs\wamp64\bin\apache\apache2.4.46\conf\extra\httpd-vhosts.conf",
and replaced "Require local" to "Require all granted", below is the complete text in the file
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
and i have restarted all the services, but i cant access the server from other machine connected to the same network
The ip machine that has wampserver is "192.168.1.11", so in the other computer i entered in the browser that ip "192.168.1.11" and keeps loading about 4 minutes and stops.
can anybody help, is there something else i have to do?, thanks in advance

I have found the solution and Wampserver was not the problem.
The problem is the Windows 10 firewall that was blocking the network access.
so these are the steps to allow the network access:
1.- In windows 10 go to Menu "Firewall and network Protection"
2.- click on "Allow an app through firewall" option, it opens a window with title "allowed apps"
3.- Click on button "Change Settings" (You have to have administrator rights to do this)
4.- Click on "Allow another app", and browse to your wamp installation and search for httpd.exe of apache, in my case "D:\Programs\wamp64\bin\apache\apache2.4.46\bin\httpd.exe", and click on button add "Add"
5.- and in the columns "Private and Public", check the checkbox for "Public" column and last click on button "Ok" at the bottom of the window
6.- Now you can access to Wampserver Homepage from another machine in the same network
This works but it is strange, because i didnt have to do these steps with wamp early versions
Hope this help to others with the same problem

Related

access xampp server from other PC over LAN

I just downloaded the latest XAMPP version installed it on my new PC.
however I cannot access the local webserver via browser(Google Chrome) from another PC on my LAN.
I allowed MySQL and Apache through my Firewall.
setup a static IP on my server PC. (192.168.1.130)
I also changed the configuration of httpd.conf file
from
<Directory />
AllowOverride none
Require all denied
</Directory>
to
<Directory />
AllowOverride All
Require all denied
</Directory>
then I restarted apache.. still cannot access it via IP or Computer name.
Okay so after tons of searches, I finally found an answer, here's what I did..
Go into the Windows Firewall settings and click the "Advanced" button, and in the next dialog click "Inbound Rules" - click "New Rule"
In the rule type window, choose Port
In the program window, leave All Programs selected
In protocols and ports, leave protocol as TCP, and Local Ports should be "Specific Ports", enter 80,443
In the scope window, don't enter any specific ip addresses
In the action window, Allow the Connection
In the profile window, leave them all ticked
And finally, in the name, call it something useful, like HTTP_ports
credits to this link

Wamp Server : Access from different server possible to phpmyadmin, but not to the sites

I have Wamp Server installed on a Windows Server 2008. It's working fine on local, and here is my phpmyadmin.conf :
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks ExecCGI
AllowOverride all
Order Allow,Deny
Allow from all
Allow from ::1
</Directory>
The problem, is that I can access to phpmyadmin from my computer with servername/phpmyadmin, but I can't access to my websites nor the index page with servername/ or servername/site.
The port is 80.
I have this error :
Forbidden
You don't have permission to access /glpi on this server.
If you wish to allow access to your site in \wamp\www\glpi then the best solution is to create a Virtual Host but if you just want a quick solution all you need to do is use the wampmanager menu as follows :-
wampmanager -> Put Online
This will make the correct change, which is to change the httpd.conf file.
Here is a link to another answer on how and why to create Virtual Hosts, it is aimed at WAMPServer 2.5 but it will work just as well for WAMPServer 2.4 Project Links do not work on Wamp Server
For those who this was not obvious, the error came from the first line :
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
This only give access to the phpmyadmin directory. So the solution is to replace or add a new block with :
<Directory "c:/wamp/www/">
And now you'll gain the access to your websites from another computer.

How to access my Wamp Server on another Local Computer

How can i access my local wamp server on another computer
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
i use this code in http.config file but not work
You could simply use the Put Online option of your WAMP Server and you can use this current system IP address and to directly access from the other computer.
Do this on system tray
Then, you could find your IP address using typing ipconfig or whatismyip.com website and then access it on another system.
As you are able to access it from the local computer that run the server by http://localhost you have two options to access it from your local area network LAN:
Using the local IP of the computer for example: http://192.168.1.20
Using the computer name for example: http://computer1/
To know your current IP:
Start -> in search field write cmd and hit enter to open the command line -> in the command line write: ipconfig you will get something like that:
Your computer IP address is the value of IPv4 Address.
To know your computer name just right click on the computer icon in the start menu then choose properties to get this screen shot:
However, for computer name method you have to be sure that every computer in your LAN has a unique name.
Update
There are some routers firmware supports local DNS on the router, so you have not need to edit the hosts files for every machine in the network. For example that I already have, dd-wrt firmware on Linksys WRT54G:
Mine wasn't working before when I tried using my computer's IP in the URL.
I found the reason to be the line in httpd.conf:
ServerName localhost:80
which I updated to be
ServerName {My comp's IP}:80
Step 1 : Press window button + R at the same time which opens the run tool of Windows.
Step 2 : Write CMD, then press 'Enter' button. This operation opens CMD terminal.
Step 3 : Then write 'ipconfig' command
Step 4 : Then note your ipv4 Address : 192.168.x.x (From Wireless Lan Adapter Wi-Fi Header) (This Ip address is needed by other computers in the place of localhost in URL)
Step 5 : Go to phpmyadmin.conf file of hosting system(Where wamp is installed...File path -> C:\wamp\alias\phpmyadmin.conf)
Step 6 : Replace this statement
<ifDefine APACHE24>
Require local
</ifDefine>
<ifDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</ifDefine>
with
Require local
Require ip 192.168.0
Note : (If your Ip is something like 192.147.x.x) then you write 'Require 192.147.0' instead of 'require 192.168.0')
Step 7 : Restart your Wamp server
Step 8 : Enter the link 192.x.x.x/phpmyadmin in the url bar of your own system from which you want to access the hosting wamp server
Step 9 : End.
If you just need to access the wamp server from another LAN PC, as some of the answers have pointed out, you can use the LAN IP or Computer-Name in the URL, as long as VirtualHost's ServerName or ServerAlias directive contains that LAN IP or Computer-Name (so Apache can return the correct website).
But if you need to use a domain-name, you'll have to edit every PC's Hosts file and update it with the correct domain-name to LAN IP address resolve (and make sure that LAN IP is assigned each time to the correct device by the Router).
Though there are much better solutions that will work for all devices (including Mac, Linux, mobile devices such as iPhones, Android phones, etc) if you have a WiFi Router that can either be flashed with one of the open firmwares or is already capable of DNS Masquerading as outlined here: Accessing Websites on a Local Network (LAN) Web Server. "DNS Masquerading" (in this context) is basically using the WiFi Router's own "Hosts file" to do the domain-name to LAN IP resolve.
Hope this helps
I couldn't connect event after doing all the above-mentioned steps. Then I uninstalled my current wampserver (3.0 version) and installed 2.5 version of wampserver. And it worked perfectly. You just need to click on 'Put Online' and you are done. Others can access your server by putting your ip address in the URL instead of localhost.
stop the wamp server and open C:\wamp64\bin\apache\apache2.4.41\conf\extra\httpd-vhosts.conf
replace
# 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>
add
Require all granted
above the Directory closing tag.
Then turn off the windows firewall for [domain, private,
public] networks in my case only [private network] works
Re-Start wamp server

How to setup virtual host using Wamp Server properly? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 months ago.
Improve this question
I need your help here in creating a virtual host in wampserver. In office I can create a virtual hosts but when I try to create in my laptop it doesn't work. I still can't figure out what's wrong. Here's what I did.
I copy the wordpress file in this folder. This will be the path of my project
E:\Subversion\chelle.wpblog.local
I edit the host file
C:\Windows\System32\drivers\etc\hosts
I added it to the end of file
127.0.0.1 chelle.wpblog.local
Next is I enable the virtual host in Apache
C:\wamp\bin\apache\Apache2.4.4\conf\httpd.conf
I uncomment this
Include conf/extra/httpd-vhosts.conf
Next is I setup the virtual host in WAMP
C:\wamp\bin\apache\Apache2.4.4\conf\extra\httpd-vhosts.conf
I add this at the bottom
<VirtualHost *:80>
ServerName chelle.wpblog.local
ServerAlias chelle.wpblog.local
DocumentRoot "E:/Subversion/chelle.wpblog.local/"
<Directory "E:/Subversion/chelle.wpblog.local/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Last is restart wampserver and open the chelle.wpblog.local in the browser. And it doesn't display. It display only google search results.
I was installing the zend framework on my local wamp using apache server.
First go and decide what will be your domain name for the local url.
Ex->www.test_zend_tutorial.com
then go and open the file located at "C:\WINDOWS\system32\drivers\etc"
hosts
write
127.0.0.1 (use one tab space) www.test_zend_tutorial.com
then go to the folder located at
D:\wamp\bin\apache\Apache2.2.17 (whatever is your version) \conf\
and open the file
httpd.conf
and search for text
Include conf/extra/httpd-vhosts.conf
and uncomment it by removing the # tag from the start of the line.Save the file and close it.
Now go to another folder located at
D:\wamp\bin\apache\Apache2.2.17\conf\extra
and open the file
httpd-vhosts.conf
and paste the code below at the last in this file
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot "D:\wamp\www"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerName www.test_zend_tutorial.com
DocumentRoot "D:\wamp\www\(your project folder name)\public"
SetEnv APPLICATION_ENV "development"
<directory "D:\wamp\www\(your project folder name)\public">
DirectoryIndex index.php
AllowOverride all
Order Allow,Deny
Allow from all
</directory>
</VirtualHost>
and restart the wamp, now write the www.test_zend_tutorial.com in the browser and you will see the things working.
If when you use the new domain in the browser it goes to a google search or something like that then the change to your hosts file has not been recognised.
You have to either reboot after changing the hosts file or more simply run these 2 commands from a command windows ( as administrator )
net stop dnscache
net start dnscache
This will refresh windows DNS cache and pick up your hosts file changes.
It is also a good idea to ping your new domain to check it is being seen, use
ping chelle.wpblog.local
If it reports 127.0.0.1 as the ip address and 4 send and 4 receieved packet then the domain is now known to Windows, if it reports some other ip address the hosts file change has not succeeded.
Also it is a good idea when creating VHOSTS to also create one for localhost or the wamp home page will not work.
You also have old Apache 2.2 syntax (Order allow,deny allow from all) you could try using the Apache 2.4 syntax, see below
So try this
## must be first so the the wamp menu page loads
<VirtualHost *:80>
ServerAdmin webmaster#mail.net
DocumentRoot "D:/wamp/www"
ServerName localhost
<Directory "D:/wamp/www">
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster#mail.net
ServerName chelle.wpblog.local
ServerAlias www.chelle.wpblog.local
DocumentRoot "E:/Subversion/chelle.wpblog.local"
<Directory "E:/Subversion/chelle.wpblog.local">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
In WampServer 3.0.4 you do not need to run through all those setting up.
Go to local host and under Tools area for "Add a Vertual Host" in the first time it will say turn on "Vertual Host sub menu" in wamp server settings.
To get there right click on wamp icon > go to wamp server settings > and click on Vertual Host sub menu. Then re-fresh the page and follow the setup process, you just need to provide the server name and path. It will do all the works for you.
Simple as that
Method 1:
in hosts file
127.0.0.1 mysite
::1 mysite
in C:\wamp64\bin\apache\apache2.4.23\conf\extra\httpd-vosts.conf file add your virtual host as follows
<VirtualHost *:80>
ServerName mysite
DocumentRoot "<path_to_your_local_site>"
<Directory "<path_to_your_local_site>">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Make sure vhost configuration is enable in httpd.conf file is enabled as follows
C:\wamp64\bin\apache\apache2.4.23\conf\httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
After you have changed configuration as above, restart all service in wamp and load website as follows
http://mysite
your local site should open.
Method 2:
In latest versions of wamp, you can do this configuration via webpage.
Open localhost in your browser. You would see wamp welcome page.
Down below under Tools, there is option to add virtual host. click on the link which would take you to add virtual host page.
In Name of the host, enter your site name eg: mysite
Under Complete absolute path of the VirtualHost folder, enter the path of your site.
Save the config and restart all services. you should be able to open mysite with the link http://mysite
As pointed in another answer, in newer versions of wam
The answers above are overcomplicating the problem somewhat, and in fact the question is including extra information that's misleading the responders.
The clues lie in step 2 and the symptoms described in 5. The hosts file is set up but when the request is made to "blah.local", google responds. Apache is not involved.
The first step to diagnosis would be pinging blah.local and seeing that it maps correctly to 127.0.0.1. I have never (in many years as a developer) found it necessary to restart local DNS on either Windows or Linux/Mac so I would expect this to work out of the box. But if it doesn't, of course restart DNS and see that it does.
However, late versions of Chrome at least do not recognize the TLD '.local' and so when you put the URL back in the browser, it's passed on to Google as a search term. There may be a setting in your browser to tell it to handle the unsanctioned TLD, but your simplest solution would be to use a TLD that's sanctioned by W3C like '.com'.
In short, if your hosts file reads something like
127.0.0.1 local.chelle.wpblog.com
rather than
127.0.0.1 chelle.wpblog.local
everything should work.
Create the folder for your local website
Go to localhost (browser)
Click Add a Virtual Host button
Add the name of the virtual host
Add the complete absolute path
Restart DNS

XAMPP terminating worker thread 0

Am running PHP applications using XAMPP server in Windows XP. It was working fine just yesterday, but suddenly it started showing the error: "Terminating worker thread 0 and Terminating worker thread 1". Does anybody know what went wrong? Can you suggest the steps I have to do to fix it?
My cmd prompt is also disappearing when I open it.
Thanks in advance.
It means you have another web server open....
In my case when I faced that issue, I had the Skype opened using port 80.
To solve this issue, you can try closing Skype and try or go to Skype settings, connection, and disable the checkbox that says: "Use port 80 and 443 as an alternatives for incoming connections" See this thread: http://www.mydigitallife.info/2008/12/03/disable-skype-from-using-opening-and-listening-on-port-80-and-443-on-local-computer/
Click the button on the xampp control panel "check ports",
this will show you whats running through port 80, the same port that apache uses by default. I had Skype running through port 80 as soon as I quite Skype apache ran normally.
Thanks
Find this file in your apache conf folder : httpd-vhosts
Check this :
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Allowoverride All
order deny,allow
allow from all
</Directory>
maybe you have wrong code here ;) This is corect code in my file

Categories