PHP IDS not loading

Discussion in 'HOWTO-Related Questions' started by ana45, Jan 22, 2010.

  1. ana45

    ana45 New Member

    I created the file : /var/www/web1/web/phpids.php to call PHPIDS.

    But when I try running the url :
    Code:
    http://192.168.0.100/phpids.php
    I am returned with
    Error 404 : Page not found.

    And when I type :
    Code:
    http://192.168.0.100/phpids.php?test=%22%3EXXX%3Cscript%3Ealert(1)%3C/script%3E
    I am returned with a page load error.

    Pls help me resolve this.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Did you create the vhost with ISPConfig? If so, you must use the domain/hostname of that vhost instead of the IP address.
     
  3. ana45

    ana45 New Member

    Could you please explain what do u mean by create vhost with ISPConfig? I do not quite understand what that means...
    What I know is that followed the exact steps in the howtoforge tutorial to create PHPIDS. I used my IPaddress to do it.

    Thanks
     
  4. Ben

    Ben Active Member Moderator

    I guess what till means is, that each "web" has its own so called virtual host (vhost) in apache.

    that means abc.mydomain1.com is another vhost than xyz.mydomain2.com
    Eventhough both may point to the same IP-Adress, e.b. 192.168.0.1.

    So the question is what is the domain you associated with your "web1"?
    This domain you need to access instead of the ip adress.
     
  5. ana45

    ana45 New Member

    I don't think there is a vhost associated with web1. I can't seem to find it.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Do you use ISPConfig?
     
  7. ana45

    ana45 New Member

    No..I don think so...I don think it is even installed in my server
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Which distribution do you use? Can you post your vhost configuration?
     
  9. ana45

    ana45 New Member

    ### Section 3: Virtual Hosts
    #
    # VirtualHost: If you want to maintain multiple domains/hostnames on your
    # machine you can setup VirtualHost containers for them. Most configurations
    # use only name-based virtual hosts so the server doesn't need to worry about
    # IP addresses. This is indicated by the asterisks in the directives below.
    #
    # Please see the documentation at
    # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
    # for further details before you try to setup virtual hosts.
    #
    # You may use the command line option '-S' to verify your virtual host
    # configuration.

    #
    # Use name-based virtual hosting.
    #
    #NameVirtualHost *:80
    #
    # NOTE: NameVirtualHost cannot be used without a port specifier
    # (e.g. :80) if mod_ssl is being used, due to the nature of the
    # SSL protocol.
    #

    #
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for requests without a known
    # server name.
    #
    #<VirtualHost *:80>
    # ServerAdmin [email protected]
    # DocumentRoot /www/docs/dummy-host.example.com
    # ServerName dummy-host.example.com
    # ErrorLog logs/dummy-host.example.com-error_log
    # CustomLog logs/dummy-host.example.com-access_log common
    #</VirtualHost>
     
  10. Ben

    Ben Active Member Moderator

    As this is completely documented out, the rest of the http config is needed, especially the parts containing "DocumentRoot" and similar.
     

Share This Page