Create subdomain: Difference between revisions

From Utopia
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 11: Line 11:
Config Site:
Config Site:


{{code|cd /etc/apache2/sites-available|}}
{{code|cd /etc/apache2/sites-available}}




Line 21: Line 21:
Let it at minimum look like this:
Let it at minimum look like this:


{{code|cat yourSubDomain.yourDomain.tld.conf}}
<pre>cat yourSubDomain.yourDomain.tld.conf


{{code|<VirtualHost *:80>
<VirtualHost *:80>
ServerName yourSubDomain.yourDomain.tld}}
ServerName yourSubDomain.yourDomain.tld
DocumentRoot /path/to/your/subdomain/source
</VirtualHost></pre>


{{code|DocumentRoot /path/to/your/subdomain/source}}
{{code|</VirtualHost>}}




Line 36: Line 35:




Restart Apache:
Rest<code></code>art Apache:


{{code|service apache2 restart}}
{{code|service apache2 restart}}
Line 51: Line 50:
# Edit your chosen Domain
# Edit your chosen Domain
# Create new "A-Record" with the subdomain name... linked to the Domain IP
# Create new "A-Record" with the subdomain name... linked to the Domain IP
It may take some time 'till the dns is updating his records... in doubt, sleep over it... :)

Latest revision as of 19:15, 16 April 2023


How to make a new subdomain on a Debian VPS (Host Europe), with an apache2


Apache Config:

Config Site:


cd /etc/apache2/sites-available


New Config:


cp 000-default.conf yourSubDomain.yourDomain.tld.conf


Let it at minimum look like this:

cat yourSubDomain.yourDomain.tld.conf

<VirtualHost *:80>
ServerName yourSubDomain.yourDomain.tld
DocumentRoot /path/to/your/subdomain/source
</VirtualHost>


Enable site:


a2ensite yourSubDomain.yourDomain.tld.conf


Restart Apache:


service apache2 restart


HostEurope DNS Config:

  1. Log into KIS
  2. Produktverwaltung
  3. Domainservices
  4. Domain-Administration
  5. Nameserver- / DNS-Eintraege bearbeiten
  6. Edit your chosen Domain
  7. Create new "A-Record" with the subdomain name... linked to the Domain IP

It may take some time 'till the dns is updating his records... in doubt, sleep over it... :)