getting a "forbidden" error 403 when accessing any other page than ISPconfig panel.

Discussion in 'General' started by neumann, Aug 27, 2012.

  1. neumann

    neumann Member

    I have searched high and low here and with google, and I'm about to give up.

    I've installed the perfect server for ubuntu 12.04 LTS with ISPconfig3 which I also have on another server, and think it's awesome.

    I'm getting the response "forbidden" no matter what page I'm trying to get served. I expect to get the "It works" or the welcome page you guys have custumized. Usually ISPconfig works right out of the box. I have changed the port for the control panel to 8000 instead of 8080, (and it took me a while to realize that it is necessary to open that port from within ISPconfig as well. Otherwise it is impossible to reach the control panel after a reboot).

    And I've been looking in /var/log/apache2/error.log where I get this line for every attempt:
    [Mon Aug 27 12:54:52 2012] [error] [client x.x.x.x] client denied by server configuration: /etc/apache2/htdocs

    But there are no htdocs anywhere on the machine!?? So the info is of no help.

    What am I missing?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You get this error when you use which port? And do you use the IP address, the hostname of the server or the domain of a website as URL in the browser?
     
  3. neumann

    neumann Member

    For now I'm using the ip number, but I originally found the problem when I had an external DNS service pointing to the server, so both things have been attemted.

    I can fine connect to the ISPconfig admin pages with port 8000. It is when I try to connect to 1 vhost on port 80.
     
  4. neumann

    neumann Member

    I'm just setting up the system, so I have only 1 vhost right now. But I have made more than 1, and even if i havent uploaded anything, you guys have made a general index file with some information so one knows that it is working. But it doesn't for me right now. :-(
     
    Last edited: Aug 27, 2012
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Ensure that you selecetd the correct IP address in the website settings. If the IP dont show up, then add it under system > servr IP first.
    2) the default vhost seems to be disabled on your server. Enable it with:

    a2enmod default
    /etc/init.d/apache2 restart

    3) ensure that you access the sites by domain name and that the dns records of the domains point to the IP address of the site.
     
  6. neumann

    neumann Member

    If I try to:
    a2enmod default
    I get this error:

    ERROR: Module default does not exist!
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Sorry, I posted the wrong command. Please use:

    a2ensite default
    /etc/init.d/apache2 restart
     
  8. neumann

    neumann Member

    This is the reply:
    Site default already enabled

    So it must be something else.

    btw, thank you for helping me out. :)
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I posted 3 possible resaons for the error, soweknow that ist not the secodn one.What about the other two?
     
  10. neumann

    neumann Member

    I have tried 1 and 2. without any luck.

    I can't test 3 because the site doesn't have a dns at this time.

    I have a (production) webpage which shall run on this new server. The DNS is from a third party, and when this server works I'll switch the DNS to point at the new server. I only have that domain name for the time being, so I can't really switch over before I have some idea that the server works.

    And I know that the server works when I can se it response to the servers ip number. This is working on my own server which is also ispconfig3 just on ubuntu 10.04. So I know that if all is right i can see the server response will be "it works ...." just by calling the ipnumber of the server.

    My guess is that the problem relates to vhost, but if you have any other suggestions, please don't hesitate to spill your thoughts :)
     
    Last edited: Aug 27, 2012
  11. till

    till Super Moderator Staff Member ISPConfig Developer

  12. neumann

    neumann Member

    That doesn't solve the problem.

    If you call my own server with the ip: 87.72.206.148 you see a page stating that the server works.

    If you try the same with the new server with the ip: 87.72.207.97 you'll get the error 403.

    In my opinion that has nothing to do with DNS, because the default site shouild be presented at direct ip call. It does with my own server, but not with the new one.

    Both servers are ISpconfig3 but different ubuntu's.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the apache default vhost in /etc/apache2/sites-evailable/ if it conatins only the first IP address, try to replace it with * or add a copy of the first vhost in the file with the second IP address.
     
  14. neumann

    neumann Member

    The default had a *. The vhost I tried earlier had the ip number because I gave it that in your answer #5 in this thread. It is now back to * as well.

    There must be a setting in apache that denys serving any pages. And since it's even the default, there must be something generally disabling apache from serving any pages.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    No, thats not the case. Its just a issue with your default vhost. I posted above two options, so if * does not work, create default vhosts for each ip address.
     
  16. neumann

    neumann Member

    I'm confused.

    There is only 1 ip address. The other one is for my own server, which is located elsewhere. I only mention it because it's a similar system that actually works (well). So the ip of that is only mentioned for comparison.
     
  17. neumann

    neumann Member

    So maybe the solution is to reinstall from scratch?
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont think so, there is nothing wrong with the installation in general. Your server just not use the ubuntu default vhost. Post the output of:

    ls -la /etc/apache2/sites-enabled
     
  19. neumann

    neumann Member

    The Output is:

    root@jensen:~# ls -la /etc/apache2/sites-enabled
    total 8
    drwxr-xr-x 2 root root 4096 Aug 24 11:43 .
    drwxr-xr-x 7 root root 4096 Aug 14 08:14 ..
    lrwxrwxrwx 1 root root 39 Aug 14 21:27 000-apps.vhost -> /etc/apache2/sites-available/apps.vhost
    lrwxrwxrwx 1 root root 26 Aug 14 08:14 000-default -> ../sites-available/default
    lrwxrwxrwx 1 root root 43 Aug 14 21:27 000-ispconfig.conf -> /etc/apache2/sites-available/ispconfig.conf
    lrwxrwxrwx 1 root root 44 Aug 14 21:29 000-ispconfig.vhost -> /etc/apache2/sites-available/ispconfig.vhost
    lrwxrwxrwx 1 root root 48 Aug 24 11:43 100-sufbellman.dk.vhost -> /etc/apache2/sites-available/sufbellman.dk.vhost
     
  20. neumann

    neumann Member

    But why doesn't it use ubuntus default vhost. I have followed the guide promptly. Only changed the portnumber for the ISPC3 control panel.

    So I figure it should work out of the box?
     

Share This Page