By SynteX
Hi,
I followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-7
But my problem is that i don’t have any idea how to set-up a subdomein my currently site is http://dev-talk.eu but i can’t launch the admin panel i made cuz the admin panel needs a subdomain: admin.dev-talk.eu
But how can i create a subdomain?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi There. In My case, just change “sites-available” with “conf.d” and follow with your_domain.conf
This answer is not correct. “sites-available” is a Debian thing, not a CentOS thing.
If you follow this steps you have to edit YOUR_DOMAIN.conf file which is located /etc/httpd/sites-available/YOUR_DOMAIN.conf
TODO:
sudo nano /etc/httpd/sites-available/YOUR_DOMAIN.conf
add this codes end of the file:
<VirtualHost *:80>
ServerName SUB_DOMAIN.YOUR_DOMAIN
ServerAlias YOUR_DOMAIN
DocumentRoot /YOUR/SUB/DOMAIN/PATH
ErrorLog /YOUR/ERROR/LOG/PATH
CustomLog /YOUR/REQUESTED/LOG/PATH combined
</VirtualHost>
Restart apache:
sudo apachectl restart
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.