I am getting Error 404: The page you are looking for cannot be found

Type: Suggestion

Description:
Hello,
I am getting 404 error when I view index.php . But http://domain.com/wp-admin is okay

<VirtualHost 127.0.0.1:80 default:80>
ServerName tun-lyin-aung.digitalstacks.net
ServerAlias *
DocumentRoot /opt/bitnami/tla.digitalstacks.net/htdocs
ErrorLog /opt/bitnami/tla.digitalstacks.net/htdocs/log/error.log
CustomLog /opt/bitnami/tla.digitalstacks.net/htdocs/log/access.log combined

<Directory “/opt/bitnami/tla.digitalstacks.net/htdocs”>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride None
Require all granted
# BEGIN WordPress fix for plugins and themes
# Certain WordPress plugins and themes do not properly link to PHP files because of symbolic links
# Root location · Issue #43 · bitnami/bitnami-docker-wordpress-nginx · GitHub
RewriteEngine On
RewriteRule ^bitnami/wordpress(/.) $1 [L]
# END WordPress fix for plugins and themes
# BEGIN WordPress
# htaccess – WordPress.org Forums
RewriteEngine On
RewriteRule .
- [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{SERVER_NAME} =tun-lyin-aung.digitalstacks.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI}
# END WordPress

Include “/opt/bitnami/apache/conf/vhosts/htaccess/wordpress-htaccess.conf”

<VirtualHost 127.0.0.1:443 default:443>
ServerName tun-lyin-aung.digitalstacks.net
ServerAlias *

ErrorLog /opt/bitnami/tla.digitalstacks.net/htdocs/log/error.log
CustomLog /opt/bitnami/tla.digitalstacks.net/htdocs/log/access.log combined

SSLEngine on
SSLCertificateFile “/opt/bitnami/apache/conf/bitnami/certs/server.crt”
SSLCertificateKeyFile “/opt/bitnami/apache/conf/bitnami/certs/server.key”
DocumentRoot /opt/bitnami/tla.digitalstacks.net/htdocs
<Directory “/opt/bitnami/tla.digitalstacks.net/htdocs”>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride None
Require all granted
# BEGIN WordPress fix for plugins and themes
# Certain WordPress plugins and themes do not properly link to PHP files because of symbolic links
# Root location · Issue #43 · bitnami/bitnami-docker-wordpress-nginx · GitHub
RewriteEngine On
RewriteRule ^bitnami/wordpress(/.) $1 [L]
# END WordPress fix for plugins and themes
# BEGIN WordPress
# htaccess – WordPress.org Forums
RewriteEngine On
RewriteRule .
- [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Include “/opt/bitnami/apache/conf/vhosts/htaccess/wordpress-htaccess.conf”

There are 2 paths of vhosts : /opt/bitnami/apache and /opt/bitnami/apache2 with the same configurations. Is this related to the error ?

This error has nothing to do with the Apache’s configuration but with the files in the filesystem. Did you remove any app’s files from the /opt/bitnami/wordpress or /bitnami/wordpress directories?

The apache2 folder is a symlink to the apache one. You are actually accessing the same file no matter the directory you use.

Hello jota, I didn’t remove any files from /opt/bitnami/wordpress .

Sorry, I though you were using that a Bitnami WordPress solution but it seems you deployed the application inside /opt/bitnami/tla.digitalstacks.net/htdocs

<VirtualHost 127.0.0.1:80 default:80>
ServerName tun-lyin-aung.digitalstacks.net
ServerAlias *
DocumentRoot /opt/bitnami/tla.digitalstacks.net/htdocs

Please confirm the files are inside that directory but I also suggest you follow our guides to deploy your application on top of one of our solutions

https://docs.bitnami.com/aws/infrastructure/lamp/administration/create-custom-application-php/

If you continue running into issues, please create a new ticket in the forum using the “Technical issue” category.

Thanks