Error 404: Not Found (Windows, Apache)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • T.T
    Junior Member
    • Feb 2025
    • 4

    Error 404: Not Found (Windows, Apache)

    Hello everyone,

    I'm new to the forum, as unfortunately I couldn't find a suitable answer for myself.
    I have Espo running on a Windows Server 2019 with Apache and Espo 9.0.1.
    The local installation also works perfectly, unfortunately I can't access Espo remotely.

    With my current configuration I manage to access Espo (I see the favicon, etc.), but I get the error Error 404: Not found (as shown in the screenshot)

    [edit] I have just updated from version 9.0.1 to 9.0.4. Now only ‘Not Found’ is displayed in the browser, otherwise everything remains the same.
    and I have also created a user portal and was able to access it successfully.


    Can you please help me as I feel like I'm going round in circles without finding the right way.
    Thank you very much

    I have attached parts of my config here as code to show you what I have tried so far:

    httpf.conf
    Code:
    LoadModule rewrite_module modules/mod_rewrite.so
    
    <Directory C:/xampp/htdocs/espo/>
      AllowOverride All
    </Directory>
    
    #test 4 Espo
    <IfModule mod_fcgid.c>
      FcgidPassHeader Authorization
      FcgidPassHeader Proxy-Authorization
      FcgidPassHeader HTTP_AUTHORIZATION
    </IfModule>
    #test 4 Espo
    <IfModule mod_fastcgi.c>
       FastCgiConfig -pass-header Authorization \
                     -pass-header Proxy-Authorization \
                     -pass-header HTTP_AUTHORIZATION
    </IfModule>​
    httpd-vhosts.conf:
    Code:
    <VirtualHost *:443>
        ServerName ####.####.de
        DocumentRoot "C:/xampp/htdocs/espo/public/"
        Alias /client/ C:/xampp/htdocs/espo/client/
    <Directory C:/xampp/htdocs/espo>                ###If only to htdocs = Forbidden | with /espo = Error 404 (but Favicon, copyright and BG)
        AllowOverride None
    </Directory>
    <Directory C:/xampp/htdocs/espo/public/>
        AllowOverride All
    </Directory>
        ErrorLog "logs/espocrm-error.log"
        CustomLog "logs/espocrm-access.log" common
    </VirtualHost>​
    .htaccess (Espo root):
    Code:
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        # Forbid access. Not actual as redirect to `public` is applied.
        # An extra security measure if redirect not fired.
        RewriteRule ^/?data/ - [F]
        RewriteRule ^/?application/ - [F]
        RewriteRule ^/?custom/ - [F]
        RewriteRule ^/?vendor/ - [F]
        RewriteRule /?web\.config - [F]
        #nRewriteRule reset/?$ reset.html [QSA,L] #test​
    Cron running every minute:
    Code:
    C:\xampp\php\\php.EXE -f C:\xampp\htdocs\espo\cron.php
    EspoCRM Setting:
    Code:
    Administration > Settings > Webadress = https://####.####.de
    Last edited by T.T; 02-14-2025, 04:34 PM. Reason: updated and tested userportal
  • T.T
    Junior Member
    • Feb 2025
    • 4

    #2
    I really don't know what I can do next please help me.

    Comment

    • lazovic
      Super Moderator
      • Jan 2022
      • 879

      #3
      Hi T.T,

      Please check what errors appear in the EspoCRM error log and in the server error log.

      Comment

      • T.T
        Junior Member
        • Feb 2025
        • 4

        #4
        Error found, everything is much easier than expected.
        Unfortunately, this was not at all clear from the instructions.
        What solved my error is that I deleted the database and reinstalled Espo (not via localhost).
        And now it works.
        Now Espo is only accessible from outside, but that's the way it should be

        If anyone else has the same error, do exactly the same.
        Delete your Espo folder, your database and reinstall everything. BUT do not run the installation on your ‘localhost’, but via the URL that points to your Espo directory.

        To be on the safe side, here is my httpd-vhosts.conf again:

        Code:
        <VirtualHost *:443>
            ServerName ###.######.com
            DocumentRoot "C:/xampp/htdocs/espo/"
            SSLEngine on
            SSLCertificateFile      "Path_to_certificate.cer"
            SSLCertificateKeyFile   "Path_to_key.key"
        </VirtualHost>​
        Good luck....

        Comment

        Working...