HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Forbidden error (http://www.howtoforge.com/forums/showthread.php?t=48739)

viro 13th September 2010 00:59

Forbidden error
 
Hello, I'm new to the forum, I have a problem.
I installed ISPConfig, but when I create a domain and point the broswer to the new site I get this error:

Forbidden

You don't have permission to access /sito.it on this server.
Apache/2.2.14 (Ubuntu) Server at 178.79.142.187 Port 80

How can I fix?

Thanks.

falko 13th September 2010 12:58

Which ISPConfig version do you use? 2 or 3?
Any errors in Apache's error log?

viro 13th September 2010 14:19

Thanks for your answer, use the version 3, while I do not know how to see the error log. I'm new :o

falko 14th September 2010 14:59

Logs are in the /var/log/ directory and its subdirectories.

For example, you can take a look at the last 100 lines from /var/log/apache2/error.log as follows:
Code:

tail -n100 /var/log/apache2/error.log

viro 14th September 2010 16:04

Hello, and busi for the answer.
The eror log is this:

[Tue Sep 14 14:11:24 2010] [error] [client 93.148.52.31] client denied by server configuration: /var/www/prova.it

viro 14th September 2010 16:37

I modified the file prova.it.vhost place / etc/apache2/sites-available / where reported this:

<Directory /var/www/prova.it>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

with this:

<Directory /var/www/prova.it>
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>

So it works, but there is a way to make everything go automatically without opening the file of every new site created?

Also now when I open the site address I set out the folders:
cgi-bin
log
ssl
tmp
website (where there is the index.html file)

and not released directly to the page index.html.

How can I fix?
Thanks

falko 15th September 2010 17:54

Can you post the whole prova.it.vhost file?

Quote:

Originally Posted by viro (Post 239276)
Also now when I open the site address I set out the folders:
cgi-bin
log
ssl
tmp
website (where there is the index.html file)

and not released directly to the page index.html.

How can I fix?
Thanks

You can configure the start folder in your FTP client (e.g. web/).

viro 15th September 2010 18:03

This is my file prova.it.vhost

Code:

<Directory /var/www/prova.it>
    AllowOverride None
    Order Deny,Allow
    Allow from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/prova.it/web
 
    ServerName prova.it
    ServerAdmin webmaster@prova.it

    ErrorLog /var/log/ispconfig/httpd/prova.it/error.log

    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html
       
    <Directory /var/www/prova.it/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
       
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>
    <Directory /var/www/clients/client1/web1/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
       
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>

    # cgi enabled
        <Directory /var/www/clients/client1/web1/cgi-bin>
      Order allow,deny
      Allow from all
    </Directory>
    ScriptAlias  /cgi-bin/ /var/www/clients/client1/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    # suexec enabled
    SuexecUserGroup web1 client1
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
    <IfModule mod_fcgid.c>
      # SocketPath /tmp/fcgid_sock/
      IdleTimeout 3600
      ProcessLifeTime 7200
      # MaxProcessCount 1000
      DefaultMinClassProcessCount 3
      DefaultMaxClassProcessCount 100
      IPCConnectTimeout 8
      IPCCommTimeout 360
      BusyTimeout 300
    </IfModule>
    <Directory /var/www/prova.it/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
        <Directory /var/www/clients/client1/web1/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web1 client1
    </IfModule>


</VirtualHost>


till 15th September 2010 18:13

The reason for your error is that you try to access a namebased apache vhost by enterung the IP address in the browser. The solution is lready posted in your other thread.

http://www.howtoforge.com/forums/showthread.php?t=48800


All times are GMT +2. The time now is 13:55.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.