Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nuri-it/apache-subdomain
- Owner: nuri-it
- License: gpl-3.0
- Created: 2022-02-10T17:16:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-11T08:36:12.000Z (almost 3 years ago)
- Last Synced: 2024-11-10T12:37:49.919Z (2 months ago)
- Language: Shell
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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