Điểm:0

Configuring SSL With Virtual Hosts under Apache and ubuntu

lá cờ cn

I've got two websites being served from a ubuntu instance.

So, https://siteone.com and https://sitetwo.com both work fine.

My subdomain were fine https://subdomain.siteone.com and https://subdomain.sitetwo.com before I moved https://sitetwo.com to cloudfare.

SInce I did that The issue is https://subdomain.sitetwo.com displays https://siteone.com.

I have one public IP address available.

    <VirtualHost *:80>

ServerAdmin [email protected]
ServerName sitetwo.ca
ServerAlias www.sitetwo.ca
DocumentRoot /var/www/boom/
 <Directory /var/www/boom/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>
ErrorLog ${APACHE_LOG_DIR}/sitetwo.ca_error.log
CustomLog ${APACHE_LOG_DIR}/sitetwo.ca_access.log combined

RewriteEngine on
RewriteCond %{SERVER_NAME} =www.sitetwo.ca [OR]
RewriteCond %{SERVER_NAME} =sitetwo.ca
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>


<VirtualHost *:80>

ServerAdmin [email protected]
ServerName label.sitetwo.ca

DocumentRoot /var/www/html/laravel-db-import/public/
 <Directory /var/www/html/laravel-db-import/public/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>
ErrorLog ${APACHE_LOG_DIR}/label.sitetwo.ca_error.log
CustomLog ${APACHE_LOG_DIR}/label.sitetwo.ca_access.log combined

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

</VirtualHost>
vidarlo avatar
lá cờ ar
Tại sao bạn sử dụng viết lại? Tạo *hai* vhost, một vhost cho mỗi miền. CF bảo toàn tiêu đề Máy chủ và xử lý SNI. Tất cả các trình duyệt hiện đại cũng vậy.

Đăng câu trả lời

Hầu hết mọi người không hiểu rằng việc đặt nhiều câu hỏi sẽ mở ra cơ hội học hỏi và cải thiện mối quan hệ giữa các cá nhân. Ví dụ, trong các nghiên cứu của Alison, mặc dù mọi người có thể nhớ chính xác có bao nhiêu câu hỏi đã được đặt ra trong các cuộc trò chuyện của họ, nhưng họ không trực giác nhận ra mối liên hệ giữa câu hỏi và sự yêu thích. Qua bốn nghiên cứu, trong đó những người tham gia tự tham gia vào các cuộc trò chuyện hoặc đọc bản ghi lại các cuộc trò chuyện của người khác, mọi người có xu hướng không nhận ra rằng việc đặt câu hỏi sẽ ảnh hưởng—hoặc đã ảnh hưởng—mức độ thân thiện giữa những người đối thoại.