Problem to access apache web server home page - WAMP Server and WordPress

I am starting to develop a small web site on my PC
I already have a ftp server on it, and using dynamic dns from no-ip I can access it with this name cbsl.ddns.net
I forwarded port 80 to my PC on my internet box (like I did for ftp ports)
Now I installed WAMPServer and then WordPress.
Everything looks to be correctly configurered (mySQL db created etc...)
In my browser, when I code localhost/CBSL, I get the WordPress home page
But when I code http://cbsl.ddns.net/cbsl, I get this error

Forbidden
You don't have permission to access /cbsl on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at cbsl.ddns.net Port 80

This shows that the connection works but it is refused.
What did I miss in the config ?
Thanks
LVL 1
LeTayAsked:
Who is Participating?
 
LeTayAuthor Commented:
I found the solution !
I had to change this section <Directory "c:/wamp/www/">
Put Require all granted (instead of Require local)
I found also the little WAMP menu (hidden icon) and there is an option to put it offline or online, I assume this has the same effect ...
1
 
Marco GasiFreelancerCommented:
Look at your httpd.conf (Apache conf file) near to the end of the file you should see something like
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

Open in new window


Change it to

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

Open in new window

0
 
Dave BaldwinFixer of ProblemsCommented:
My WAMP installation has a line in the config in the tray that allows or denies external access.  Default is to deny access.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
DrDamnitCommented:
This can also happen if you don't have an index.htm our index.php file. Can you confirm that the directory route is both configured properly ( the directory exist) and that it hasn't index.html index.php file?
0
 
DrDamnitCommented:
*Directory root. (Mobile / auto correct issues)
0
 
LeTayAuthor Commented:
Much better with this Allow from all !!!
0
 
LeTayAuthor Commented:
Answer too quickly ..
Was still using localhost in the URL
Same result with cbsl.ddns.net > error as above
0
 
Marco GasiFreelancerCommented:
You hould post here your httpd-vhost.conf file and your HOSTS file contents, please. It could be a mismatch in the site name in these two files. If you don't want to post here these files, you can just check that the name of the DocumentRoot in the first file be identical to the site listed in HOSTS file.
0
 
LeTayAuthor Commented:
No such hosts file in my Windows 7 PC ...
Name is correct and anyway the apache server does answer ... with an error
So ?
0
 
Marco GasiFreelancerCommented:
No such hosts file in my Windows 7 PC ...
c:\Windows\System32\drivers\etc\
Name is correct and anyway the apache server does answer
This doesn't mean anything: Apache can respond with that error message if you're trying to access a site with a wrong name, otherwise I'd not suggested to check those files
0
 
Chris StanyonCommented:
WAMPServer's default httpd.conf will serve pages for localhost - if you look through the httpd.conf file, you'll see the following line:

ServerName localhost

This will usually be followed by the  <Directory /> block you've already edited - but it's still for the localhost.

Best way to handle this is to enable virtual hosts and then create an entry specifically for your new domain into the httpd-vhosts.conf file. Make sure your HOSTS file maps the domain to your local IP and you should be good to go.

In the httpd.conf file, remove the # from the following line:

#Include conf/extra/httpd-vhosts.conf

Now edit that httpd-vhosts.conf file and add a section for your new domain name. Something like this:

<virtualhost *:80>
      ServerName cbsl.ddns.net
      DocumentRoot "C:/path/to/your/files/public_html/"

      <Directory "C:/path/to/your/files/public_html/">
            AllowOverride All
            Order allow,deny
            Allow from all
      </Directory>
</virtualhost>

Now edit your HOSTS file and add the following (note - the file maybe hidden and/or readonly, and it doesn't have a file extension):

127.0.0.1      cbsl.ddns.net

Save all your files and restart Apache (from the WAMPServer menu)

If you set it up the way I've outlined, then you should get your files served when you call your domain - if you include a folder at the end of your domain name, then make sure your files are in the folder, so if you call:

http://cbsl.ddns.net/cbsl/

then make sure you files are in:

C:/path/to/your/files/public_html/cbsl/
0
 
LeTayAuthor Commented:
Thanks
I made all the changes you propose.
Now I get this :
You don't have permission to access /cbsl on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at cbsl.ddns.net Port 80
0
 
Chris StanyonCommented:
Add a file in there and call it directly. For example - add in a file called index.html and then make sure you append that to the url - it will identify whether this is a problem with it not serving a default index page or not serving any page.
0
 
LeTayAuthor Commented:
There is already a index.php there but whatever I put in the URL, even an non-existing file, I get the same permission error
In my httpd-vhosts.conf, I added as said this, (unremark it in the httpd-conf file) and restarted the service :
<VirtualHost *:80>
      ServerName cbsl.ddns.net
      DocumentRoot "C:/wamp/www/"
      <Directory "C:/wamp/www/">
            AllowOverride All
            Order allow,deny
            Allow from all
      </Directory>
</VirtualHost>
0
 
LeTayAuthor Commented:
No other answer to the question did result in a 100 % solution
0
 
Tinotenda ZirambaCommented:
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

this method worked for me. thanks so much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.