DEV Community

Andrea
Andrea

Posted on • Edited on

1 1

AWS LightSail: varios sitios en un mismo Apache

Pasos para hostear varios sitios en un mismo Apache. Por las dudas, tenerlo en cuenta para que la instancia no reviente :P



1. sudo mkdir -p /var/www/example.com/html
2. sudo mkdir -p /var/www/example.com/log
3. sudo chown -R $USER:$USER /var/www/example.com/html
4. sudo chmod -R 755 /var/www
5. sudo vi /var/www/example.com/html/index.html
6. sudo vi /etc/httpd/conf/httpd.conf
Add `IncludeOptional sites-enabled/*.conf`
7. sudo vi /etc/httpd/conf.d/example.com.conf
<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com
    DocumentRoot /var/www/example.com/html
    ErrorLog /var/www/example.com/log/error.log
    CustomLog /var/www/example.com/log/requests.log combined
</VirtualHost>
8. Restart Apache
Enter fullscreen mode Exit fullscreen mode

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay