ERROR 404 - Not Found!

Discussion in 'General' started by DanDan1, Mar 27, 2017.

  1. DanDan1

    DanDan1 New Member

    Hello,
    I installed ISPConfig on a fresh Debian GNU/Linux 8 VPS. After i added a new website, and added some files in /var/www/testwebsite.com/web and tried to acces testwebsite.com/myfile.txt i get this error :

    Code:
    # ls -l
    total 7860
    -rw-r--r-- 1 web3 client0  4 Mar 26 18:49 myfile.txt
    -rw-r--r-- 1 web3 client0  4 Mar 26 18:53 2.txt
    drwxr-xr-x 2 web3 client0  4096 Mar 26 18:40 error
    -rwxr-xr-- 1 web3 client0  7358 Mar 26 18:40 favicon.ico
    -rwxr-xr-- 1 web3 client0  1862 Mar 26 18:52 index.html1
    -rwxr-xr-- 1 web3 client0  14 Mar 26 18:40 robots.txt
    drwxr-xr-x 2 web3 client0  4096 Mar 26 18:40 stats
    What i did wrong ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Does the domain points to the correct IP address of this server? Do you see the 404 error in the access.log of this website?
     
  3. DanDan1

    DanDan1 New Member

    Is the corect ip.
    here is the log:
    Code:
    # cat /var/www/test1.websitetest123.com/web/1.txt
    test 123
    #
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    It is strange your error log references "/var/www/test1.websitetest123.com/web/1.txt", as ISPconfig does not set the DocumentRoot to /var/www/sitename/web/ but rather /var/www/clients/client#/web#/web/.

    What is the output of 'apachectl -S' ?
     
    ahrasis likes this.
  5. DanDan1

    DanDan1 New Member

    @Jesse Norell you are right, the corect path for me in this case is /var/www/clients/client0/web4/web

    But now i can`t install wordpress on it, php runs ok, but i can`t install wordpress, after i put the db info it show a error 500:

    Code:
    # apachectl -S
    -bash: apachectl: command not found
    #
    L.E: I've enable cgipath and is working. But the phpmyadmin is not working:
     
    Last edited: Mar 28, 2017
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    A 500 server error will show in the error log what the problem is, check there. (or you did get this working?)

    I'd review the Perfect Server guide for debian8/nginx and make sure you have everything installed and any needed steps done. With apache, phpmyadmin is configured at /phpmyadmin for all sites out of the box, and from looking at the config it would probably work with mod_php, but not other php modes, due to open_basedir restriction; what I did to address this is redirect /phpmyadmin on all sites to the server's hostname, which hits the default apache vhost and mod_php works there; eg. this would be /etc/apache2/conf-enabled/phpmyadmin_redirect.conf on the ispconfig server web-server-1.domain.tld with ip address 22.33.44.55:

    Code:
    # This makes the '/phpmyadmin' url work on each domain
    # by redirecting to the local server's hostname rather than
    # directly running phpmyadmin to not require phpmyadmin paths
    # in each site's open_basedir.
    
    <LocationMatch "(?i)^/phpmyadmin(/?|/.+)$">
        RewriteEngine on
        RewriteCond "%{HTTP_HOST}"  "!^web-server-1\.domain\.tld"  [NC]
        RewriteCond "%{HTTP_HOST}"  "!^22\.33\.44\.55"  [NC]
        RewriteRule (.*)  https://web-server-1.domain.tld%{REQUEST_URI}  [R=301,NE,END]
    </LocationMatch>
    
     
  7. DanDan1

    DanDan1 New Member

    ^ wordpress is working now, but problem is with phpmyadmin.
    At step 19 from the tutorial it says :
    I assume that phpmyadmin don`t use apache but instead uses nginx
     
  8. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Your whole system should be using nginx from that tutorial. Check your vhost for phpmyadmin code.
     

Share This Page