Установка ssl с перенаправлением на WordPress по умолчанию

Я пытаюсь установить ssl на Ubuntu bitnami - linux_distribution = ubuntu - linux_distribution_codename = trusty

Я внес изменения в конфигурацию в соответствии с документом: https://docs.bitnami.com/general/components/apache/. Я получаю ошибку изначально как

AH00526: Синтаксическая ошибка в строке 1 файла /opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf: не может возникнуть в рамках раздела. Проверка конфигурации apache завершается неудачно, прерывание

Чтобы исправить это, я сделал некоторые изменения и прокомментировал: "/opt/bitnami/apps/myapp/conf/httpd-prefix.conf" из /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf, i перенаправлен на WordPress по умолчанию. Запуск apache не показывает ошибок.

Ниже приведены файлы конфигурации: bitnami.conf

# Default Virtual Host configuration.

<IfVersion < 2.3 >
  NameVirtualHost *:80
  NameVirtualHost *:443
</IfVersion>

<VirtualHost _default_:80>
  DocumentRoot "/opt/bitnami/apache2/htdocs"
  <Directory "/opt/bitnami/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    <IfVersion < 2.3 >
      Order allow,deny
      Allow from all
    </IfVersion>
    <IfVersion >= 2.3 >
      Require all granted
    </IfVersion>
  </Directory>

  # Error Documents
  ErrorDocument 503 /503.html

  # Bitnami applications installed with a prefix URL (default)
  Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>

# Default SSL Virtual Host configuration.

<IfModule !ssl_module>
  LoadModule ssl_module modules/mod_ssl.so
</IfModule>

Listen 443
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !EDH !RC4"
SSLPassPhraseDialog  builtin
SSLSessionCache "shmcb:/opt/bitnami/apache2/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300

<VirtualHost _default_:443>
  DocumentRoot "/opt/bitnami/apache2/htdocs"
  SSLEngine on
SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt"
SSLCertificateFile "/opt/bitnami/apache2/conf/sentworkscert.crt"
SSLCertificateFile "/opt/bitnami/apache2/conf/sentworkscert.crt"

  <Directory "/opt/bitnami/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    <IfVersion < 2.3 >
      Order allow,deny
      Allow from all
    </IfVersion>
    <IfVersion >= 2.3 >
      Require all granted
    </IfVersion>
  </Directory>

  # Error Documents
  ErrorDocument 503 /503.html

  # Bitnami applications installed with a prefix URL (default)
  Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>

# Bitnami applications that uses virtual host configuration
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-vhosts.conf"

BitNami-приложения-prefix.conf

    # Bitnami applications installed in a prefix URL
    Include "/opt/bitnami/apps/wordpress/conf/httpd-prefix.conf"
                        Include "/opt/bitnami/apps/phpmyadmin/conf/httpd-prefix.conf"

    Include "/opt/bitnami/apps/vaxdocs/conf/httpd-prefix.conf"
    Include "/opt/bitnami/apps/BLOG/conf/httpd-prefix.conf"
    #Include "/opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf

"

bitnami-apps-vhosts.conf

# Bitnami applications installed in a Virtual Host
<VirtualHost *:80>
    ServerName app.travelhealthconsult.com
# DocumentRoot /opt/bitnami/apps/vaxdocs/htdocs/
    ErrorLog "/opt/bitnami/var/log/sub1_error_log"
    CustomLog "/opt/bitnami/var/log/sub1_access_log" common

    ProxyRequests Off
ProxyPreserveHost On
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
</VirtualHost>
#Include "/opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf"

HTTPD-vhosts.conf

<VirtualHost *:80>
    ServerName wordpress.example.com
    ServerAlias www.wordpress.example.com
    DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"

    Include "/opt/bitnami/apps/wordpress/conf/httpd-app.conf"
</VirtualHost>

<VirtualHost *:443>
    ServerName wordpress.example.com
    ServerAlias www.wordpress.example.com
    DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
    SSLEngine on
    SSLCertificateFile "/opt/bitnami/apps/wordpress/conf/certs/server.crt"
    SSLCertificateKeyFile "/opt/bitnami/apps/wordpress/conf/certs/server.key"

    Include "/opt/bitnami/apps/wordpress/conf/httpd-app.conf"
</VirtualHost>

0 ответов

Другие вопросы по тегам