How to Setup an Alias Apache2

How to Setup an Alias Apache2

I am new to UBUNTU and try to use apache to check a website that I am currently developing using Joomla (novice to that too). I am trying to setup an alias in httpd.conf, but have not been successful. Your help is appreciated.

1

2 Answers

I would expect an alias to be included in the virtual host you created in /etc/apache2/sites-enable/.

Example:

VirtualHost *> 
    ServerName example.com
    DocumentRoot /var/www/html/website

    Alias /website "/var/www/html/website"

    <Directory "/var/www/html/website">
        Options None
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Here is a great tutorial from digital ocean:

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.