Make a webserver - 403 forbidden
Posted by: Xenosis (87.48.131.---)
Date: November 23, 2016 02:30PM

Hello

I'm trying to setup my server to be able to host webpages..

I've installed Wamp and tried configuering it as in the tutorials below:

[hsnyc.co]

[www.howtogeek.com]

But when I try the asccess the site externally i get this error:

Forbidden

You don't have permission to access / on this server.
Apache/2.4.23 (Win64) PHP/5.6.25 Server at xxx.xxx.xxx.xxx Port 80

changing the apache setings with:
Order Allow,Deny

Allow from all

Dont seem to work.

Also disable firewall dont work..

Everyting else looks correct with password on phpmyadmin etc.

Options: ReplyQuote
Re: Make a webserver - 403 forbidden
Posted by: Otomatic (Moderator)
Date: November 23, 2016 04:26PM

Hi,

Before following any tutorials, make sure that they do not concern totally obsolete versions of Wampserver. Because talking about "Allow from all" for Apache 2.4.23 borders on stupidity. Especially since you do not have to change anything in httpd.conf, and especially not to put obsolete directives valid for Apache 2.2 and not for Apache 2.4.

Before you want to open local sites on the outside, you must already make sure that they are correctly declared locally, so you must use VirtualHost for your local sites; see The need for Virtual Host.

And only when the VirtualHost works correctly locally, you can allow one or more VirtualHost to be accessed from the outside.
Note: PhpMyAdmin and a possible password has nothing to do with external accesses.

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

Options: ReplyQuote
Re: Make a webserver - 403 forbidden
Posted by: RiggsFolly (Moderator)
Date: November 23, 2016 05:33PM

Can I also ask that you post the answer to these questions Read (and answer) before you ask a question

---------------------------------------------------------------------------------------------
(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: Make a webserver - 403 forbidden
Posted by: Xenosis (195.215.232.---)
Date: November 28, 2016 01:02PM

Sorry for the delay on a reply..


Okay I got external access using IP, but how do I add a TLD domain?

I've just now changed my domains DNS records(hosted at cloudflare) so A record is point to my servers IP.

But how do I setup the server/wamp to use it?


Also I'm using a previous installed mySQL, i am using for hosting ARMA3 servers.. Will this need to be configured or have wamp no problems with using another mySQL?

Info as requsted:

1 - Windows 8,1 Pro 64Bit
2 - wampserver3.0.6_x64_apache2.4.23_mysql5.7.14_php5.6.25-7.0.10
3 - Apache Version 2.4.23?
4 - 5.6.25
5 - I've installed mySQL 5.6(used to host ARMA 3 server)
6 - Orange (1 of 2 services running)

Thank you..

Options: ReplyQuote
Re: Make a webserver - 403 forbidden
Posted by: Xenosis (195.215.232.---)
Date: November 28, 2016 01:51PM

Hmm.. It seems just changing the DNS A record was all that needed to be done..

I've justed tried installing Wordpress and it works fine..

Only problem is that Wordpress is placed in a folder so I need to use domain.com/wordpress to access..

I tryed adding a htaccess file in root with


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

But don't seem to work..

Any ideas to how to fix?

Thank you..

Options: ReplyQuote
Re: Make a webserver - 403 forbidden
Posted by: RiggsFolly (Moderator)
Date: November 28, 2016 06:39PM

13 questions and only 6 answers?

---------------------------------------------------------------------------------------------
(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: Make a webserver - 403 forbidden
Posted by: Otomatic (Moderator)
Date: November 28, 2016 06:47PM

Hi,

> 6 - Orange (1 of 2 services running)
Prerequisites :
--- The Wampmanager icon in the taskbar MUST be GREEN.
--- If the icon is not green, there is no point expecting everything to work as it means that one of both of the Apache/MySQL services has not started.
TROUBLESHOOTING TIPS

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

Options: ReplyQuote
Re: Make a webserver - 403 forbidden
Posted by: Xenosis (195.215.232.---)
Date: November 29, 2016 11:45AM

Otomatic Please read the whole thread before answering..


I got it working now..


The only thing i need know is how do I add more sites/domains?

I've changed my second domain A record, but how do I setup the server to know where to find the website when using domain..

Inside WAMP WWW folder I've made a folder for each domain.. It works perfectly for the first domain, but how do I procede with adding a second domain and point it to the folder..

Thank you..


EDIT:

I have added another virtuel host like this:


# Virtual Hosts
#

# domain1.com:

<VirtualHost *:80>
ServerName domain1.com
ServerAlias *.domain1.com domain1.com
DocumentRoot c:/wamp64/www/folder1
<Directory "c:/wamp64/www/folder1/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

# domain2.com:

<VirtualHost *:80>
ServerName domain2.com
ServerAlias *.domain2.com domain2.com
DocumentRoot c:/wamp64/www/folder2
<Directory "c:/wamp64/www/folder2/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
#


It looks to work locally on the server, but I think DNS is still updating, so I get my old host when try externally to access the domain. atm.

Can anyone confirm this is correct way to do this?



Edited 2 time(s). Last edit at 11/29/2016 12:37PM by Xenosis.

Options: ReplyQuote
Re: Make a webserver - 403 forbidden
Posted by: RiggsFolly (Moderator)
Date: November 30, 2016 10:14AM

It looks good to me

Although I would be tempted to change

ServerName domain1.com
ServerAlias *.domain1.com domain1.com

To

ServerName domain1.com
ServerAlias *.domain1.com

---------------------------------------------------------------------------------------------
(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


Sorry, only registered users may post in this forum.