TL;DR: I Just ran the installation tutorial provided in How to install & setup Ghost on Ubuntu 16.04, 18.04, 20.04 or 22.04. But I had to skip NGINX and set reverse proxy through apache. The process outputs
"Ghost was installed successfully! To complete setup of your publication, visit: https : // mysite dot com /ghost.
(broken links on variious parts here because new users are only allowed to post 3 links)
However, this address returns Not Found The requested URL was not found on this server. Apache/2.4.41 (Ubuntu) Server at mysite.com Port 443
.
The installation process:
I already have an application running on apache reverse proxy, so I can’t have NGINX running because port 80 is already in use by apache. So I decided to go with the installation skipping NGINX and setting SSL by myself (although I’m kinda a rookie on that).
The installation process went smoothly. Then I created the file /etc/apache2/sites-available/ghost.conf
(based on Apache Subdirectory Setup), without the subdirectory part:
<VirtualHost *:80>
# Replace with your domain
ServerName mysite dot com
# Replace with your domain
Redirect permanent / https : // mysite dot com
</VirtualHost>
<VirtualHost *:443>
# Replace with your domain
ServerName mysite.com
SSLProxyEngine on
# Your SSL Certificate details. Replace with your own SSL setup
# SSLCertificateFile /path/to/cert
# SSLCertificateKeyFile /path/to/key;
</VirtualHost>
Then,
sudo a2ensite ghost.conf
sudo systemctl reload apache2
sudo certbot --apache
- selected my domain
- option 2 -Redirect
-
ghost setup
(just to be sure).
So, I received:
Ghost was installed successfully! To complete setup of your publication, visit:
https : // mysite dot com / ghost/
If I visit https : // mysite dot com, I get the file structure of /var/www/mysite
and if I visit https : // mysite dot com / ghost/ I get Not Found The requested URL was not found on this server. Apache/2.4.41 (Ubuntu) Server at mysite dot com Port 443
.
After this process, /etc/apache2/sites-enabled/ghost.conf
looks like this:
<VirtualHost *:80>
# Replace with your domain
ServerName mysite dot com
# Replace with your domain
Redirect permanent / https : // mysite dot com
RewriteEngine on
RewriteCond %{SERVER_NAME} =mysite dot com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
# Replace with your domain
ServerName mysite dot com
ServerAdmin my email
DocumentRoot /var/www/mysite
SSLProxyEngine on
# Your SSL Certificate details. Replace with your own SSL setup
# SSLCertificateFile /path/to/cert
# SSLCertificateKeyFile /path/to/key;
SSLCertificateFile /etc/letsencrypt/live/mysite.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mysite.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
What Could be wrong? As I said, I’m new to all these stuff. Any ideas will be super appreciated! ;-)