default page for shared IP

Discussion in 'Installation/Configuration' started by sc0ut, Nov 29, 2005.

  1. sc0ut

    sc0ut New Member

    Hi,
    I've been using ISPConfig v. 2.1.0, and have upgraded to 2.1.1, server is a VPS running SuSE 9.2, with 2 IPs.
    When I enter any of those two IPs as URL I get Error 403, instead of index.html page from /var/www/sharedip/
    Apache2 error log says:

    [Tue Nov 29 03:08:28 2005] [error] [client 70.84.59.xx] client denied by server configuration: /var/www/sharedip/

    Here's the part of /etc/apache2/vhosts/Vhosts_ispconfig.conf with shared IP config (as set by ISPConfig):


    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 207.210.77.xx:80
    <VirtualHost 207.210.77.xx:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    NameVirtualHost 207.210.77.xx:80
    <VirtualHost 207.210.77.xx:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>


    What could be wrong?
     
  2. Tribal-Dolphin

    Tribal-Dolphin ISPConfig Developer ISPConfig Developer

    Have you an .htaccess file in the directory ?
    What's your Apache's Default Root ?
     
  3. sc0ut

    sc0ut New Member

    There's no .htaccess in /var/www/sharedip/
    and default root is as it was set during installation:

    DocumentRoot "/srv/www/htdocs"

    (in /etc/apache2/default-server.conf)

    Just came to it, could someting like:

    <Directory "/var/www/sharedip">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

    in Vhosts_ispconfig.conf solve the problem? And will that be overwritten by ISPConfig?
     
  4. Tribal-Dolphin

    Tribal-Dolphin ISPConfig Developer ISPConfig Developer

    Try to modify /var/www/sharedip/ by /srv/www/htdocs/sharedip and move the old foder to the new location.
     
  5. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Everything in Vhosts_ispconfig.conf will be overwritten by ISPConfig.

    But does ISPCOnfig not write a vhost for the sharedIP in your Vhosts_ispconfig.conf?

    <VirtualHost [IP-ADDRESS:pORT]>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
     
  6. sc0ut

    sc0ut New Member

    Well, I wrote that ISPConfig added:
    NameVirtualHost 207.210.77.xx:80
    <VirtualHost 207.210.77.xx:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    NameVirtualHost 207.210.77.xx:80
    <VirtualHost 207.210.77.xx:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>

    in Vhosts_ispconfig.conf, but somehow that page / directory was forbidden (got error 403 when tried to load it).
    I added:

    <Directory "/var/www/sharedip">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

    in /etc/apache2/default-server.conf, and now that page is accessible, and works fine.
    I think ISPConfig should not alter that file, so the change will be permanent.

    (just for the record, if someone else get the same error, I'm using SuSE 9.2 & apache 2.0.55, ISPConfig 2.1.1)
     
  7. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    ISPCOnfig does not cahnge the file: /etc/apache2/default-server.conf
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    I've just experienced the same behaviour on Mandriva 2006, therefore I added

    Code:
    <Directory /var/www/sharedip>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    to /etc/httpd/conf/httpd.conf.

    I've also modified the ISPConfig installer so that it will write this section to the httpd.conf in future versions automatically.:)
     
  9. bccisp01

    bccisp01 New Member

    Re: Sharedip

    Where in the httpd.conf file does this go?

    Thanks,
     
  10. bccisp01

    bccisp01 New Member

    Re: Main Default Site?

    Hey guys,

    I don't mean to ask a silly question but I am stumped. I have the domain ispconfig.homelinux.net point to my server which is a Fedora Core 4 install with latest and greatest. ISPConfig installed fine. However when I goto this url http://ispconfig.homelinux.net I get a sharedip page. Needless to say I am cornfused by this. How do I create the main site so that when someone goes to that url it shows the main default site which should be my pages.

    Thanks,
     
  11. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Create a new website in Ispconfig with host: ispconfig and domain: homelinux.net and your private IP.
     
    Last edited: Nov 29, 2005
  12. bccisp01

    bccisp01 New Member

    Thank you sir Iwill try that.
     
  13. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    At the end, right before the part that was added by the ISPConfig installer.
     

Share This Page