Virtual Host Development Tutorials, Guides & Insights
Unlock 1+ expert-curated virtual host tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your virtual host skills on DeveloperBreeze.
Adblocker Detected
It looks like you're using an adblocker. Our website relies on ads to keep running. Please consider disabling your adblocker to support us and access the content.
Tutorial
Adding a Subdomain on an Apache Server
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName blog.example.com
DocumentRoot /var/www/blog.example.com
<Directory /var/www/blog.example.com>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/blog.example.com-error.log
CustomLog ${APACHE_LOG_DIR}/blog.example.com-access.log combined
</VirtualHost>- ServerAdmin: Your email address or the administrator’s email address.
- ServerName: The subdomain you are setting up (
blog.example.com). - DocumentRoot: The directory where your subdomain’s files are located.
Aug 21, 2024
Read More