Bagisto 2.x

Associating Your Domain

Associate Your Domain with Bagisto

To associate your domain with the application and the AWS IP address, you will need to edit the following files;

File 1: /etc/httpd/sites-available/bagisto.conf

Log on via SSH,

$ ec2-user

$ sudo -i

$ nano /etc/httpd/sites-available/bagisto.conf

then modify these lines with your domain. Replace yourdomain.com with your domain name; and RewriteRule http to https

<VirtualHost *:80>

ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/bagisto/public

RewriteEngine on
RewriteCond %{SERVER_NAME} =www.yourdomain.com [OR]
RewriteCond %{SERVER_NAME} =yourdomain.com
RewriteRule ^ http://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

<Directory /var/www/bagisto/public>

AllowOverride All
Order allow,deny
allow from all

</Directory>

</VirtualHost>

<VirtualHost *:443>

ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/bagisto

RewriteEngine on
RewriteCond %{SERVER_NAME} =www.yourdomain.com [OR]
RewriteCond %{SERVER_NAME} =yourdomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

<Directory /var/www/bagisto/public>

AllowOverride All
Order allow,deny
allow from all

</Directory>

</VirtualHost>

 

CONTENTS