3

I have 2 virtual hosts serving 2 different sites in my Ubuntu Server 20.04 both in port 80 and 443.

I want to use the same server to serve some static files for download on a custom port, let's say 8080.

I added a share_backup_folder.conf configuration file on my /etc/apache2/sites-available with the following content:

<VirtualHost *:8080>
        ServerName vpsxxxxx.ovh.net
        DocumentRoot /var/www/backup
    Alias /backup /var/www/backup
    &lt;Directory /var/www/backup&gt;
            Require all granted
            Options +Indexes
            AllowOverride None
            Order allow,deny
            Allow from all
    &lt;/Directory&gt;

</VirtualHost>

I enabled it with sudo a2ensite share_backup_folder and restart apache2 sudo systemctl restart apache2 with no errors.

When I wget vpsxxxxx.ovh.net:8080/backup/example_file.tar.gz it fails with Connection refused

What am I missing here?

Thank you.

1 Answers1

1

You probably miss a

Listen 8080

and it prbably belons into /etc/apache2/ports.