简体   繁体   中英

How to create subdomain on Amazon EC2?

I have issue with creation subdomains on Amazon EC2 Ubuntu distribution, because I'm new in EC2 and linux administration.

I found this answer, but I don't understand third paragraph. Is it necessary? If so what is the CNAME record and where I should create this.

About fourth paragraph. I know that Apache 2.4 is not support NameVirtualHost . And I can not use it. Isn't it?

Fifth paragraph. httpd.conf don't exists in /ect/apache2/ . But I have sites-available and sites-enabled directories. What should I do in this case?

And about subdomain path. I should locate subdomain directory in /var/www/sitename.com/www/ (root site directory) or in /var/www/sitename.com/ . Is it fundamentally?

Thanks for your answers. Off topic: Sorry for my not good English.

  1. The CNAME record needs to be created in the DNS hosting your domain. You will need to do this with your DNS provider, typically not in the nameserver (bind) on your Ubuntu machine.

  2. NameVirtualHost is not needed anymore for Apache 2.4, yes. It was used before to instruct the server that a particular IP address and port combination was usable as a name-based virtual host. Nowadays, is sufficient.

  3. You can put the statements into any (new) file in sites-available and link that new file in sites-enabled, or create a new httpd.conf. All of that should work.

  4. Where to store the subdomain is entirely up to you and how you would like to structure your setup on your disk.

I hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM