Question

I still see IP address and not domain name

Hi everyone!

I create a new droplets with Ubuntu 18.04 in order to install Moodle on it. I will need later to create a new droplets for Big Blue button.

I followed all this instruction: 1-) https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04 2-) https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04#step-5-—-setting-up-virtual-hosts-(recommended) 3-) https://www.digitalocean.com/community/tutorials/how-to-install-moodle-on-ubuntu-16-04 4-) https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04

I already change DNS from my domain websapiens.it to my droplets. But when I type in browser https://www.websapiens.it/moodle it display this http://68.183.220.130/moodle/

Can someone help me to figure it out the issue? Is there any miss-configuration from the server that I need to do?

Thanks.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I forgot to mentioned that inside <virtualhost> the file 000-default.conf I have this code:

RewriteEngine on Rewritecond %{SERVER_NAME} =websapiens.it [OR] RewriteCond%{SERVER_NAME} =www.websapiens.it RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END, NE,R=permanent]

Hi Alex,

Yes, here you are: When I’m going to /etc/apache2/sites-available I have 3 file:

000-default-le-ssl.conf (which create when I install the SSL with certbot) <VirtualHost *:443> ServerAdmin webmaster@localhost ServerName websapiens.it ServerAlias www.websapiens.it DocumentRoot /var/www/html/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

000-default.conf

<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName websapiens.it ServerAlias www.websapiens.it DocumentRoot /var/www/html/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

The main root is located at /var/www/html/moodle so there URL should be websapiens.it/moodle


About the file .htaccess is empty. When I use the command (nano .htaccess) on root directory on /moodle/ the file is empty

Thank you for your help

Hello, @amministrazioneDolphin

Could you please share the content of the virtual host for your domain name so we can check this? The virutal host should have a content like this one:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName your_domain
    ServerAlias www.your_domain
    DocumentRoot /var/www/your_domain
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Also if you’ve used certbot for the SSL Certificate there should be a virtual host for port 443 as well.

Also are you using a .htaccess file and if so would mind sharing the content of this one two?

At the moment there is a 301 Redirect in place and we just need to see from where it’s coming in order to sort this out.

Regards, Alex