Home directory of web

Discussion in 'Installation/Configuration' started by Captain, Mar 28, 2010.

  1. Captain

    Captain Member

    Hello!

    I have one question. How I can open home directory of a web.
    I am admin of ISPConfig 2. Now DNS of my web is not direct to my server.
    I transfered my web with DB and all web files from another webserver to my, but DNS zone still on old server. And firstly I want to see my web site and after that rewrite DNS zone to my server.

    For example http://123.123.123.123/web12/web
    or
    http://ispconfig_server.tld/web12/web

    But it is not work in ISPConfig.

    How I can to do that?

    Big thnks.
     
    Last edited: Mar 28, 2010
  2. falko

    falko Super Moderator ISPConfig Developer

  3. Captain

    Captain Member

    It is not what I meant.
    But thnks.
    I am not in a local network.
    I need to connect from Internet.
     
  4. createch

    createch ISPConfig Developer ISPConfig Developer

    One simple method:

    For example, you have under /var/www the following
    www.test.com -> /var/www/web63 (and there is a index.html inside this directory)
    and your IP is 210.17.XXX.66

    You may do the following steps (assuming that is a FC distos, do minor amendments for other distros)

    1. edit /etc/httpd/conf/httpd.conf
    2. Add the following before the line "Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf"

    <VirtualHost 210.17.XXX.66:80>
    ServerName 210.17.XXX.66:80
    DocumentRoot /var/www
    </VirtualHost>


    3. Restart Apache (service httpd restart)


    Now.....You may use
    http://210.17.XXX.66/web63/web/index.html

    to point to the site above

    Enjoy....
    Let us know if you still have problem
     
    Last edited: Mar 29, 2010
  5. Captain

    Captain Member

    Yes its work. Thnks.
    But now if I have index.html its ok, but if I have any .php file. it is not work.
    For exmpl. index.php opens as text.
     
  6. createch

    createch ISPConfig Developer ISPConfig Developer

    I see....
    in that case, add in /etc/httpd/conf/httpd.conf the following too (between <VirtualHost 210.17.XXX.66:80> and </VirtualHost>

    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>


    then the system will know how to handle the php files.
     
  7. Captain

    Captain Member

    Now its work ok!

    Big thnks!
     
  8. falko

    falko Super Moderator ISPConfig Developer

    This works also for public IP addresses.
     

Share This Page