I'm attempting to create a BookStack site on an Amazon Lightsail instance.
I'm having an issue where my static public IP address attached to my Lightsail instance will go to my site just fine, from any browser or computer. However, my domain address I pointed to that same IP will time out and not work.
The OS is Ubuntu 18.04, IP is [IP]
, domain is [domain].dev
.This is the script BookStack uses to setup on Ubuntu 18.04. Virtual host configuration is below.
I've tried/done the following:
- I host with Google Domains and I've gone to my DNS and added A records for @ (base domain) and www that points to my static ip. Didn't work.
- I created a DNS zone through the Lightsail console pointing @ and www to my static IP. I then added the Amazon nameservers to my Google Domain's nameservers instead of Google's. Didn't work.
- I tried the above again using Route 53 and configuring the nameservers there instead of using Lightsail's DNS zones, but that didn't work either.
When I ping the static IP it times out and I don't get a response, but from what I've read online that can be normal for some website. When I ping my domain it resolves to the right IP address but also doesn't get a response.
I'm confused as to why pinging my domain gives me the right IP address but the website still refuses to load. I've been trying over multiple days so it shouldn't be a propagation issue. The website will load via IP but not by using the domain.
<VirtualHost *:80>
ServerName [domain].dev
ServerAdmin webmaster@localhost
DocumentRoot /var/www/bookstack/public/
<Directory /var/www/bookstack/public/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
</Directory>
ErrorLog /error.log
CustomLog /access.log combined
</VirtualHost>