Pages: 12Next
Current Page: 1 of 2
can't access WP site externally nor from WAMP Server icon
Posted by: tjboy38 (---.sxzd1.woo.bigpond.net.au)
Date: January 29, 2015 03:39PM

Hi

I've been trying to nut this one out for days but no luck. I can access the WordPress through the Dashboard (localhost/wpsite/wp-admin/) and entering 'localhost/wpsite' in a web browser.

However, I can't access my Wordpress site externally nor from My Projects / My Virtual Hosts on WAMP Server icon

I'm running:
Windows 8.1 Pro 64 Bit
WAMP Server 2.5
Apache 2.4.9
PHP 5.5.12
My SQL 5.6.17
Wamp Server Icon is green
Active lines in hostfiles are:
127.0.0.1 localhost
127.0.0.1 wpsite
::1 localhost
::1 wpsite
Yes, I have access to both localhost (Homepage WampServer) and phpMyAdmin
Antivirus is AVG Free
Full path for Wampserver is "C:\wamp\"
Port forwarding is enabled

I've followed the ideas in WAMPServer 2.5 The Homepage, Your Projects Menu and the need for Virtual Hosts (http://forum.wampserver.com/read.php?2,127757)
including:
editing the 'httpd-vhosts.conf' file
adding the domain name to the Hosts file
refreshing the Domain name cache (net stop dnscache and net start dnscache)
including the Virtual Hosts definition file in 'httpd.conf'
turning on 'My Virtual Hosts' menu on WAMP server icon

Any help would be much appreciated!!

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.as43234.net)
Date: January 29, 2015 04:01PM

How are you trying to address your sit ein the browser when you are outside your router?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: tjboy38 (---.sxzd1.woo.bigpond.net.au)
Date: January 30, 2015 04:39AM

Thanks, I'm using:

[myipaddress]


The error message from this is:


Forbidden

You don't have permission to access /wpsite/ on this server.

Apache/2.4.9 (Win64) PHP/5.5.12 Server at myipaddress Port 80

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: tjboy38 (---.hostname.net.au)
Date: February 03, 2015 07:39AM

So, any ideas on how to help with this one?

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.as43234.net)
Date: February 03, 2015 09:55AM

Ok lets start by getting the internal stuff working.

You have better post your httpd-vhosts.conf file.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: tjboy38 (---.sxzd1.woo.bigpond.net.au)
Date: February 03, 2015 12:21PM

Thanks, these are the lines in the httpd-vhosts.conf file which are not asterisked out:

<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/wamp/www/wpsite"
ServerName wpsite
<Directory "c:/wamp/www/wpsite">
AllowOverride All
Require local
</Directory>
</VirtualHost>

For your reference: I have changed the name of the folder containing the WordPress site to "wpsite" in the second entry of this file.

Also note, I have been using Chrome as a web browser.

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.as43234.net)
Date: February 03, 2015 12:52PM

Ah I forgot,

Can you also post your HOSTS file content please.

Thats c:\windows\system32\drivers\etc\hosts

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: tjboy38 (---.sxzd1.woo.bigpond.net.au)
Date: February 03, 2015 01:00PM

The hosts file (again unasterisked lines) is:

127.0.0.1 localhost
127.0.0.1 wpsite.loc

::1 localhost
::1 wpsite.loc

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: Otomatic (Moderator)
Date: February 03, 2015 03:30PM

Hi,

> ServerName wpsite
NO. Must be
ServerName wpsite.loc
as in hosts file

The names in hosts file and ServerName in VirtualHost must be the same.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.as43234.net)
Date: February 03, 2015 03:43PM

Ok tj,

I think the issue with accessing the wpsite from the WAMPServer homepage and the WAMPManager icon is that the domain name you created in the HOSTS file

127.0.0.1 wpsite.loc
::1 wpsite.loc

does not match the
ServerName wpsite
in your httpd-vhosts.conf file.


My prefered solution would be to change the httpd-vhosts.conf file to this


<VirtualHost *:80>
   DocumentRoot "c:/wamp/www/wpsite"
   ServerName wpsite.loc                                 <-- this is the change
   <Directory "c:/wamp/www/wpsite">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

But this means you may need to change the site Url etc in your WordPress install.

So you may like to change the HOSTS file instead to

127.0.0.1 localhost
127.0.0.1 wpsite

::1 localhost
::1 wpsite



RE: External access, I will post another reply when I get a minute.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: tjboy38 (---.sxzd1.woo.bigpond.net.au)
Date: February 04, 2015 11:35AM

Hey Riggsy - spot on!!! That worked like a charm for local access to the wp site! Thanks!!

Can you work some magic with the external access?

I'm still getting a "403 Forbidden - You don't have permission to access /wpsite on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at myipaddress Port 80"

Thanks

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.as43234.net)
Date: February 04, 2015 03:46PM

I have to start with a warning.

Remember it is not recommended to use WAMPServer as web facing web server. Unless you really know what you are doing

Security has to be a Major consideration. If you dont know Apache and Windows well enough to ensure Apache runs in a secure environment, you are asking for trouble, and I have to assume this means YOU as you are asking this question. The default configuration of WAMPServers Apache is designed to be used by a developer who's PC is protected behind a router, so is not visible on the internet.

So no comebacks to me or WAMPServer, if you get hacked!!!!

Also there is a resource issue when using a desktop Windows Operating system! As Windows 7/8 only allow only a Maximum of 20 external connections, and earlier versions allow even fewer.



Anyway my solution for this, assuming you are just wanting to allow a friend or client to view the site prior to putting it live on a professionally managed host is :-

Get a Dynamic DNS domain name, because who wants to try and remember an ip address.

I use DYNDNS but they do charge a small fee.
I believe NOIP still allow one dynamic dns domain name for free, but dont quote me on that.

If you do this you will get a domain name that looks a little funny but it will be more memorable than an ip address. They normally look something like this
tjboy.noip.net
in other words they look like a subdomain of one of their domain names which of course they are.

They normally give you a little app to download as well. This should be running all the time and it checks your routers WAN ip address and when it changes it updates their DNS server accordingly so people can still find you if you have to reboot your router and you WAN ip address changes This is another benefit of using a Dynamic DNS service as you dont have to update your friends/clients with a new ip address after any changes to your ip address


So now you have a domain name, and it is pointing to your routers WAN Ip Address.
You have Port Forwarded port 80 on the router to point to the PC running WAMPServer.

So you have to let your Apache know what to do with this domain name when it sees it in a url.
Of course this means creating a new Virtual Host definition.
This tells Apache what to do when it sees the domain name i.e. the directory to server files from and which ip's are allowed access to this domain.

So lets assume for examples sake, you have the Dynamic Domain name tjboy.noip.net

So create a Virtual Host for that domain name

<VirtualHost *:80>
    DocumentRoot "c:/wamp/www/wpsite"
    ServerName tjboy.noip.net          <-- the domain name
    <Directory "c:/wamp/www/wpsite">
        AllowOverride All
        Require all granted            <-- lets anybody in
    </Directory>
</VirtualHost>

Et Voila.

In this example you are serving tjboy.noip.net and wpsite from the same folder but thats not an issue.


Also just in case there is any confusion, you do not need to put the tjboy.noip.net domain name in the HOSTS file. Because of course that only effects the PC that holds the HOSTS file and is irrelevant to anything that happens out on the internet.

Of course you could scrap the VHOST definition for wpsite and use the tjboy.webhop.net domain name locally as well if you wanted to, in that case you would need to add that domain name to your HOSTS file, but for access from the internet it is not necessary.


Hope this explains things well enough to get you going.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 02/04/2015 03:48PM by RiggsFolly.

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: tjboy38 (---.sxzd1.woo.bigpond.net.au)
Date: February 09, 2015 12:59PM

Thanks, Riggsy

Ah , the sweet smell of success ... I followed your solution and, yes, it is up and working now ... I'm indebted to you for your time and patience.

Thanks again

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.as43234.net)
Date: February 09, 2015 01:06PM

Pleasure.....

That smell? Sure its success? lol.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: phantomthecrow (---.106.89.90.speedy.net.pe)
Date: February 08, 2016 08:25AM

Hello,
RiggsFolly..please i need your help on this topic...my wampserver is runnig perfect locally...but when i try to configure externally can't get it to work,.. i want to show a wordpress website to a client...i read and search everywhere...your solution seem the perfect one... but is not working for me. I create a folder on a D: drive..not C: where my wampserver is.... so..i need your guidance:

I'm running:
Windows 7 64 Bit
WAMP Server 2.5
Apache 2.4.9
PHP 5.5.12
My SQL 5.6.17
Wamp Server Icon is green
Port forwarding is enabled

HOSTS file:

127.0.0.1 localhost
::1 localhost

127.0.0.1 empanadas-tayta.dev
::1 empanadas-tayta.dev

VHOSTS file:

# use name-based virtual hosting.
#
NameVirtualHost *:80

# wamp
<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost.dev
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

# empanadas-tayta.com
<VirtualHost *:80>
DocumentRoot "d:/websites/empanadas-tayta.com/www"
ServerName empanadas-tayta.dev
ServerAlias www.empanadas-tayta.dev
<Directory "d:/websites/empanadas-tayta.com/www">
AllowOverride All
Require all granted
</Directory>
php_flag display_errors Off
php_flag log_errors On

php_value max_upload_size 40M
php_value max_execution_time 120
php_value error_log "d:/wamp/logs/empanadas-tayta_com_phperror.log"
</VirtualHost>

# empanadas-tayta.com
<VirtualHost *:80>
DocumentRoot "d:/websites/empanadas-tayta.com/www"
ServerName tayta.ddns.net
<Directory "d:/websites/empanadas-tayta.com/www">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Everything works fine locally ..can't get it work externally ... thank you in advance for your time.

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: February 08, 2016 10:51AM

Ok so it looks like you have a DYNDNS account, thats a good start.

I assume you have created a Host Service with a Host called tayta.ddns.net

I just ping'd that domain name and it gives an ip address of 200.106.89.90. Is that your routers WAN Ip address?

Have yo downloaded the little app they give you to keep the ip address correct?

Have you configured it correctly?
Is it keeping DYNDNS ip address up to date with your WAN Ip?

Is your PC setup as a static IP Address, port forwarding will only work if it always finds the correct internal IP address is running and has Apache running on it!

The other thing is have you amended your firewall on the PC running WAMPServer to allow remote access?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: phantomthecrow (190.237.183.---)
Date: February 08, 2016 07:47PM

Hello,
Yes, i have a DYNDNS account, properly configure.
Yes, I have created a Host Service with a Host called tayta.ddns.net
I downloaded an app called DUC from the no-ip..and now the IP Adress has changed to 190.237.183.165..and this app shows everything green.. like runnig good..and up to date.
I have setup a Static IP Address diferent from router IP..or Gateway.
On my PC..firewall configred Wampserver to allow remote acces...
In Port forwarding enabled...
One thing i noticed on my Router is that..there is a Tab says: Basic Gateway DHCP Server Settings:
DHCP Server (Yes) and there shows DHCP Clients: On a List shows ( Host Name: localhost, Interface:802.11 RF (WIFI), IP Address:192.168.1.14).....and this IP Adrees is diferent from the PC static IP Addres:192.168.1.2, and from the Gateway IP Addres: 192.168.1.1.... is this correct?.. or something im missing.

Searching for more info i found this article..im not sure if it' what i need..or a good fix..im afraid to try ("[knightshafayet.wordpress.com]winking smiley something port related.

Thank you for your time and patience my friend.

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: February 08, 2016 09:17PM

Sorry now I am confused.

You say you have a DYNDNS account, but you download an app called DUC from no-ip???????? They are not the same thing?????

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: phantomthecrow (190.237.183.---)
Date: February 08, 2016 10:21PM

Hello,
Yes I create a host service with Noip.com ... and download an App... called DUC.. ( Keep your current IP address in sync with your No-IP hostname or domain with our Dynamic Update Client (DUC).)

Options: ReplyQuote
Re: can't access WP site externally nor from WAMP Server icon
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: February 08, 2016 10:33PM

I cannot help you with Router config as I dont know every router on the market

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.