Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nuri-it/apache-subdomain

Make a Apache2 subdomain in Linux
https://github.com/nuri-it/apache-subdomain

Last synced: 10 days ago
JSON representation

Make a Apache2 subdomain in Linux

Awesome Lists containing this project

README

        

# apache-subdomain
Make a Apache2 subdomain in Linux

## But how?

First move to apache's sites directory
```
cd /etc/apache2/sites-available
```
then copy the template file
```
sudo cp 000-default.conf test.example.com.conf
```
Now edit the new config file
```
sudo nano test.example.com.conf
```
Replace the file's content with the following
```

ServerAdmin your.email@localhost
ServerName test.example.com
ServerAlias www.test.example.com
DocumentRoot /var/www/test.example.com

Options Indexes FollowSymLinks
AllowOverride All
Require all granted

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

DirectoryIndex index.php index.pl index.cgi index.htmt index.xhtml index.htm index.html

```
Now enable the new site with this command
```
sudo a2ensite test.example.com
```
Congrats!

#gg