Answers.Body: <p>Do you perchance use nginx?</p>
  <p>I ran into the same issue. Hope this below helps.</p>
  <p>The .htaccess was of course not used (which was generated by the Civi CRM installer)</p>
  <p>Chat GPT had a try at rewriting it for use in an nginx config.
  Also I use let's encrypt, on an Ubuntu 22.04 machine.</p>
  <p>Here is my config, &quot;YOUR_DOMAIN&quot; is inserted, the rest readable:</p>
  <pre><code>server {
  
  root /var/www/YOUR_DOMAIN/html;
  index index.php index.html index.htm index.nginx-debian.html;
  
  server_name YOUR_DOMAIN;
  
  # Deny access to sensitive files
  location ~ \.(inc|info|test|mo|po|sh|sql|tpl|tpl\.php)$ {
      deny all;
  }
  
  # Deny access to backup and temporary files (including backup PHP files)
  location ~ (\~|\.swp|\.bak|\.orig|\.save)$ {
      deny all;
  }
  
  # Deny access to files and directories starting with a dot (except .well-known)
  location ~ (^|/)\.(?!well-known) {
      deny all;
  }
  
  # Main location block for handling requests
  location / {
      try_files $uri $uri/ /index.php?$args;
  }
  
  # PHP FastCGI handling
  location ~ \.php$ {
      include snippets/fastcgi-php.conf;
      fastcgi_pass unix:/run/php/php8.3-fpm.sock;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      fastcgi_param HTTP_AUTHORIZATION $http_authorization;  # Pass HTTP Authorization header
      fastcgi_read_timeout 300;
  }
  
  # Deny access to .htaccess files (if any)
  location ~ /\.ht {
      deny all;
  }
  
  # Error handling for 404 (redirect to index.php)
  error_page 404 /index.php;
  
  # Caching for static files (images, CSS, JS, etc.)
  location ~* \.(jpg|jpeg|png|gif|css|js|ico|svg)$ {
      expires 2w;
      add_header Pragma public;
      add_header Cache-Control &quot;public&quot;;
  }
  
  # Extra security headers
  add_header X-Content-Type-Options nosniff;
  add_header X-Frame-Options SAMEORIGIN;
  
  # SSL configuration (managed by Certbot)
  listen [::]:443 ssl ipv6only=on;
  listen 443 ssl;
  ssl_certificate /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem;
  include /etc/letsencrypt/options-ssl-nginx.conf;
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
  }
  
  server {
  if ($host = YOUR_DOMAIN) {
      return 301 https://$host$request_uri;
  } # managed by Certbot
  
  listen 80;
  listen [::]:80;
  
  server_name YOUR_DOMAIN;
  return 404; # managed by Certbot
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-10T13:55:14.797Z
Answers.LastActivityDate: 2024-10-10T13:55:52.273Z
Answers.LastEditDate: 2024-10-10T13:55:52.273Z
Answers.UserDisplayName: Oliver
Body: <p>I have tried to install civicrm standalone on a Ubuntu server VPS. Both STABLE and RC.
  Installation run OK (in STABLE version, &quot;core&quot; folder has to be moved from &quot;web&quot; to root).
  In both cases when I go to url after installation, I have &quot;404 Not found&quot; on url .../civicrm/login.
  I find no &quot;civicrm/login&quot; in folders.
  With NIGHTLY version, the not found url has &quot;civicrm/home&quot;.</p>
  
Tags: <installation><standalone>
Title: .../civicrm/login not found after civicrm standalone installation
ThreadText: # .../civicrm/login not found after civicrm standalone installation
  
  (Asked by: username_0 on 2024-10-02)
  
  I have tried to install civicrm standalone on a Ubuntu server VPS. Both STABLE and RC.
  Installation run OK (in STABLE version, "core" folder has to be moved from "web" to root).
  In both cases when I go to url after installation, I have "404 Not found" on url .../civicrm/login.
  I find no "civicrm/login" in folders.
  With NIGHTLY version, the not found url has "civicrm/home".
  
  **Tags:** installation, standalone
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-10-10. Score: 0
  
  Do you perchance use nginx?
  
  I ran into the same issue. Hope this below helps.
  
  The .htaccess was of course not used (which was generated by the Civi CRM installer)
  
  Chat GPT had a try at rewriting it for use in an nginx config.
  Also I use let's encrypt, on an Ubuntu 22.04 machine.
  
  Here is my config, "YOUR\_DOMAIN" is inserted, the rest readable:
  
  ```
  server {
  
  root /var/www/YOUR_DOMAIN/html;
  index index.php index.html index.htm index.nginx-debian.html;
  
  server_name YOUR_DOMAIN;
  
  # Deny access to sensitive files
  location ~ \.(inc|info|test|mo|po|sh|sql|tpl|tpl\.php)$ {
      deny all;
  }
  
  # Deny access to backup and temporary files (including backup PHP files)
  location ~ (\~|\.swp|\.bak|\.orig|\.save)$ {
      deny all;
  }
  
  # Deny access to files and directories starting with a dot (except .well-known)
  location ~ (^|/)\.(?!well-known) {
      deny all;
  }
  
  # Main location block for handling requests
  location / {
      try_files $uri $uri/ /index.php?$args;
  }
  
  # PHP FastCGI handling
  location ~ \.php$ {
      include snippets/fastcgi-php.conf;
      fastcgi_pass unix:/run/php/php8.3-fpm.sock;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      fastcgi_param HTTP_AUTHORIZATION $http_authorization;  # Pass HTTP Authorization header
      fastcgi_read_timeout 300;
  }
  
  # Deny access to .htaccess files (if any)
  location ~ /\.ht {
      deny all;
  }
  
  # Error handling for 404 (redirect to index.php)
  error_page 404 /index.php;
  
  # Caching for static files (images, CSS, JS, etc.)
  location ~* \.(jpg|jpeg|png|gif|css|js|ico|svg)$ {
      expires 2w;
      add_header Pragma public;
      add_header Cache-Control "public";
  }
  
  # Extra security headers
  add_header X-Content-Type-Options nosniff;
  add_header X-Frame-Options SAMEORIGIN;
  
  # SSL configuration (managed by Certbot)
  listen [::]:443 ssl ipv6only=on;
  listen 443 ssl;
  ssl_certificate /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem;
  include /etc/letsencrypt/options-ssl-nginx.conf;
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
  }
  
  server {
  if ($host = YOUR_DOMAIN) {
      return 301 https://$host$request_uri;
  } # managed by Certbot
  
  listen 80;
  listen [::]:80;
  
  server_name YOUR_DOMAIN;
  return 404; # managed by Certbot
  }
  
  ```
  
  
  ---
  
  