Keywords: LAMP/MAMP/WAMP - AWS - Technical issue - Domain Name (DNS)
bnsupport ID: 4768f618-14ed-a840-9c26-3755a3d2e3de
Description:
Guys,
I have been playing with this for a while and can't get the virtual host to point to my domain. I have a LAMP with three Wordpress instances however am testing the below to make sure Virtual host works before I implement int he other instance. I only have one Wordpress installed on this LAMP and I just an't get it to work. The domain DNS records are pointing to the correct static IP on the Lightsail dashboard and I have set the DNS records at Google Domains as well to point to the IP so typing the domain in the browser still points to the LAMP directory page for the IP. I have not tweaked anything in the wp-config.php file.
What am I missing?
Added the domains in the /home/bitnami/stack/apps/wordpress/conf/HTTPD-VHOSTS.Conf file so it looks like this:
ServerName DOMAIN.com
ServerAlias www.DOMAIN.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
Include "/opt/bitnami/apps/wordpress/conf/httpd-app.conf"
ServerName DOMAIN.com
ServerAlias www.DOMAIN.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs" SSLEngine on SSLCertificateFile "/opt/bitnami/apps/wordpress/conf/certs/server.crt" SSLCertificateKeyFile "/opt/bitnami/apps/wordpress/conf/certs/server.key"
Include "/opt/bitnami/apps/wordpress/conf/httpd-app.conf"
Deleted the LAST LINE in the following file /home/bitnami/stack/apache2/conf/conf/bitnami-apps-prefix.conf so it looks like this:
# Bitnami applications installed in a prefix URL #Include "/opt/bitnami/frameworks/zendframework/conf/httpd-prefix.conf" #Include "/opt/bitnami/frameworks/symfony/conf/httpd-prefix.conf" #Include "/opt/bitnami/frameworks/codeigniter/conf/httpd-prefix.conf" #Include "/opt/bitnami/frameworks/cakephp/conf/httpd-prefix.conf" #Include "/opt/bitnami/frameworks/smarty/conf/httpd-prefix.conf" #Include "/opt/bitnami/frameworks/laravel/conf/httpd-prefix.conf" Include "/opt/bitnami/apps/phpmyadmin/conf/httpd-prefix.conf" Include "/opt/bitnami/apps/wordpress/conf/httpd-prefix.conf"
Added the HTTPD line in the /home/bitnami/stack/apache2/conf/bitnami-apps-vhosts.conf file so it looks like this:
# Bitnami applications installed in a Virtual Host
Include "/opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf"
I then restarted the server (sudo /opt/bitnami/ctlscript.sh restart) however I had the following message regarding the SSL which I do not have on the domain yet
$ sudo /opt/bitnami/ctlscript.sh restart AH00526: Syntax error on line 14 of /opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf: SSLCertificateFile: file '/opt/bitnami/apps/wordpress/conf/certs/server.crt' does not exis t or is empty apache config test fails, aborting /opt/bitnami/php/scripts/ctl.sh : php-fpm stopped /opt/bitnami/mysql/scripts/ctl.sh : mysql stopped /opt/bitnami/mysql/scripts/ctl.sh : mysql started at port 3306 /opt/bitnami/php/scripts/ctl.sh : php-fpm started AH00526: Syntax error on line 14 of /opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf: SSLCertificateFile: file '/opt/bitnami/apps/wordpress/conf/certs/server.crt' does not exis t or is empty apache config test fails, aborting