Vhost выпуски на Apache не HTTPS с wwwApache

Ответить Пред. темаСлед. тема
Anonymous
 Vhost выпуски на Apache не HTTPS с www

Сообщение Anonymous »

Я только что перенес сайт в прямом эфире, https://www.mynewdomain.co.uk. Решается, как я ожидал бы, он попадает в корневую каталог .Htaccess Удаляет www, и сайт работает нормально. Если я пойду на http://www.angeltrainingsystems.co.uk. Затем я не достиг правильного каталога, и я вижу свой индекс сервера, а не индекс сайта?# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.

ServerName mynewdomain.co.uk
ServerAlias www.mynewdomain.co.uk

ServerAdmin xxx@mynewdomain.co.uk
DocumentRoot /var/www/mynewdomain.co.uk/public_html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =mynewdomain.co.uk [OR]
#RewriteCond %{SERVER_NAME} =www.mynewdomain.co.uk
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

SSLCertificateFile /etc/letsencrypt/live/mynewdomain.co.uk/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mynewdomain.co.uk/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
< /code>
и мой ssl vhost < /p>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.

ServerName mynewdomain.co.uk
ServerAlias www.mynewdomain.co.uk

ServerAdmin xxx@mynewdomain.co.uk
DocumentRoot /var/www/mynewdomain.co.uk.co.uk/public_html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =mynewdomain.co.uk [OR]
#RewriteCond %{SERVER_NAME} =www.mynewdomain.co.uk
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.mynewdomain.co.uk [OR]
RewriteCond %{SERVER_NAME} =mynewdomain.co.uk
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
< /code>
Я не понимаю, почему версии HTTPS работают нормально, но версия Non Https идет в корень сервера? Что мне нужно сделать, чтобы не HTTPS в HTTPS?

Подробнее здесь: https://stackoverflow.com/questions/794 ... s-with-www
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Vhost выпуски на Apache не HTTPS с www
    Anonymous » » в форуме Php
    0 Ответы
    17 Просмотры
    Последнее сообщение Anonymous
  • Подстановочный знак в пути к каталогу vhost
    Anonymous » » в форуме Apache
    0 Ответы
    145 Просмотры
    Последнее сообщение Anonymous
  • Не могу заставить Apache2 vhost получить доступ к файлам журнала
    Anonymous » » в форуме Apache
    0 Ответы
    16 Просмотры
    Последнее сообщение Anonymous
  • Почему я получаю имя процесса с .vhost в конце концов, а не только имя? [дублировать]
    Anonymous » » в форуме C#
    0 Ответы
    5 Просмотры
    Последнее сообщение Anonymous
  • Прокси-сервер Apache с https на https с другим центром сертификации
    Anonymous » » в форуме Apache
    0 Ответы
    157 Просмотры
    Последнее сообщение Anonymous

Вернуться в «Apache»