403 Forbidden (Permission to /)

Discussion in 'Installation/Configuration' started by rannia_ptaha, Jan 23, 2007.

  1. rannia_ptaha

    rannia_ptaha New Member

    Hello!
    Sorry for may be common Q, but I couldn't find topic with my problem on these forums.

    I installed ISPserver with the DNS server.name.com. This is main server.
    Everything is ok (mail, ftp, dns). The problem with Apache.

    1. When I try to access directly to http://server.name.com/ it shows Welcome- message: " This IP address is shared. For access to the web site which you look for, enter its address instead of its IP."
    2. If I try to http://www.server.name.com/ - can't display the webpage...
    3. User can access ftp, mail,...

    ok... I configured another one site on the same server = company.com
    When I try to access directly to http://company.com/ it shows "Forbidden. You don't have permission to access / on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."

    I checked the quota and trafic = set ok.
    Looks like smth wrong with my hands, head and permission to .../www/web1 (.../www/web2) = the permission is set for web_user1 - why Apache can't access it?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please make sure that server.name.com points to the IP in DNS that you configured for your website. If your server is behind a router, you must select the internal IP for the ISPConfig website and the domain must point to the external IP of your router.
     
  3. rannia_ptaha

    rannia_ptaha New Member

    Yes - it's set as external IP. DNS is ok (mail and externel ftp - work ok).
    The problem is in Apache2. I can't understand... Looks like httpd has no rights to access .php and .html . The .../www/web1 has permission for web_user1... what else?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Are you in a NAT enviroment behind a router?
     
  5. rannia_ptaha

    rannia_ptaha New Member

    The server is stand-alone (NAT, SuSE Firewall standart, 2 LAN interfaces), without any external routers. One ETH0 = external, ETH1 - internal net.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ifconfig
    and what's in Vhosts_ispconfig.conf?
     
  7. rannia_ptaha

    rannia_ptaha New Member

    ifconfig:
    -----
    # ifconfig
    eth0 Link encap:Ethernet HWaddr 00:14:5E:2A:40:4E
    inet addr:82.143.129.50 Bcast:82.143.129.55 Mask:255.255.255.248
    inet6 addr: fe80::214:5eff:fe2a:404e/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1006 errors:0 dropped:0 overruns:0 frame:0
    TX packets:739 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:570728 (557.3 Kb) TX bytes:83563 (81.6 Kb)
    Interrupt:169

    eth1 Link encap:Ethernet HWaddr 00:14:5E:2A:40:4F
    inet addr:172.18.194.12 Bcast:172.18.194.127 Mask:255.255.255.128
    inet6 addr: fe80::214:5eff:fe2a:404f/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:78562 errors:0 dropped:0 overruns:0 frame:0
    TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:6038474 (5.7 Mb) TX bytes:11786 (11.5 Kb)
    Interrupt:169

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:253 errors:0 dropped:0 overruns:0 frame:0
    TX packets:253 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:21473 (20.9 Kb) TX bytes:21473 (20.9 Kb)
    -------
     
  8. rannia_ptaha

    rannia_ptaha New Member

    Code:
    ###################################                                                                               
    #                                                                                                                  
    # ISPConfig vHost Configuration File                                                                               
    #         Version 1.0                                                                                              
    #                                                                                                                  
    ###################################                                                                                
    #                                                                                                                  
    NameVirtualHost 82.143.129.50:80                                                                                   
    <VirtualHost 82.143.129.50:80>                                                                                       
    ServerName localhost                                                                                               
    ServerAdmin root@localhost                                                                                         
    DocumentRoot /var/www/sharedip                                                                                   
    </VirtualHost>                                                                                                     
    #                                                                                                                  
    #                                                                                                                  
    ######################################                                                                             
    # Vhost: server.name.com:80                                                                                        
    ######################################                                                                             
    #                                                                                                                  
    #                                                                                                                  
    <VirtualHost 82.143.129.50:80>                                                                                     
    ServerName server.name.com:80                                                                                      
    ServerAdmin [email][email protected][/email]                                                                                        
    DocumentRoot /var/www/web1/web                                                                                     
    ServerAlias name.company.com                                                                                        
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl 
    indexErrorLog /var/www/web1/log/error.log                                                                               
    AddType application/x-httpd-php .php .php3 .php4 .php5                                                             
    <Files *.php>                                                                                                          
    SetOutputFilter PHP                                                                                                
    SetInputFilter PHP                                                                                             
    </Files>                                                                                                           
    <Files *.php3>                                                                                                         
    SetOutputFilter PHP                                                                                                
    SetInputFilter PHP                                                                                             
    </Files>                                                                                                           
    <Files *.php4>                                                                                                         
    SetOutputFilter PHP                                                                                                
    SetInputFilter PHP                                                                                             
    </Files>                    
    <Files *.php5>                                                                                                         
    SetOutputFilter PHP                                                                                                
    SetInputFilter PHP                                                                                             
    </Files>                                                                                                           
    php_admin_flag safe_mode Off                                                                                       
    Alias /error/ "/var/www/web1/web/error/"                                                                           
    ErrorDocument 400 /error/invalidSyntax.html                                                                        
    ErrorDocument 401 /error/authorizationRequired.html                                                                
    ErrorDocument 403 /error/forbidden.html                                                                            
    ErrorDocument 404 /error/fileNotFound.html                                                                         
    ErrorDocument 405 /error/methodNotAllowed.html                                                                     
    ErrorDocument 500 /error/internalServerError.html                                                                  
    ErrorDocument 503 /error/overloaded.html                                                                           
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3                                                         
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3                                                    
    </VirtualHost>                                                                                                     
    #                                                                                                                  
    
     
    Last edited: Jan 24, 2007
  9. rannia_ptaha

    rannia_ptaha New Member

    Code:
    ######################################                                                                            
    # Vhost: company.com:80                                                                                          
    ######################################                                                                            
    #                                                                                                                 
    #                                                                                                                 
    <VirtualHost 82.142.129.51:80>                                                                                    
    
    ServerName www.company.com:80                                                                                        
    ServerAdmin [email protected]                                                                                    
    DocumentRoot /var/www/web6/web                                                                                    
    ServerAlias wowlg.ru www.company.com                                                                                 
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl 
    indeErrorLog /var/www/web6/log/error.log                                                                              
    AddType application/x-httpd-php .php .php3 .php4 .php5                                                           
     <Files *.php>                                                                                                         
    SetOutputFilter PHP                                                                                               
    SetInputFilter PHP                                                                                            
    </Files>                                                                                                          
    <Files *.php3>                                                                                                        
    SetOutputFilter PHP                                                                                               
    SetInputFilter PHP                                                                                           
    </Files>                                                                                                          
    <Files *.php4>                                                                                                        
    
    SetOutputFilter PHP                                                                                               
    SetInputFilter PHP                                                                                            
    </Files>                                                                                                          
    <Files *.php5>                                                                                                        
    SetOutputFilter PHP                                                                                               
    SetInputFilter PHP                                                                                           
     </Files>                                                                                                          
    php_admin_flag safe_mode Off                                                                                      
    Alias /error/ "/var/www/web6/web/error/"                                                                         
     ErrorDocument 400 /error/invalidSyntax.html                                                                       
    ErrorDocument 401 /error/authorizationRequired.html                                                               
    ErrorDocument 403 /error/forbidden.html                                                                           
    ErrorDocument 404 /error/fileNotFound.html                                                                        
    ErrorDocument 405 /error/methodNotAllowed.html                                                                   
     ErrorDocument 500 /error/internalServerError.html                                                                 
    ErrorDocument 503 /error/overloaded.html                                                                          
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3                                                        
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3                                                   
    </VirtualHost>                                                                                                    
    #                                        
    
     
  10. falko

    falko Super Moderator ISPConfig Developer

    82.142.129.51 doesn't exist on your server, that's why you can't see the www.company.com web site. You can add this IP address as a virtual interface to eth0 using YaST.
     

Share This Page