我已设法使用Bitnami LAMP在Google控制台上部署我的应用程序。我正在尝试设置子域,但我一直收到此错误。
无法访问此网站 找不到subdomain.domain.com的服务器IP地址。
以下是我在httpd-vhosts.conf中的条目
[routerLink]="['artists', 'artistId']"
bitnami.conf 代码
<VirtualHost *:80>
ServerAdmin webmaster@DOMAIN.com
DocumentRoot "/opt/bitnami/apache2/htdocs/DOMAIN_FILES"
ServerName DOMAIN.com
ServerAlias www.DOMAIN.com
ErrorLog "logs/DOMAIN.com.com-error_log"
CustomLog "logs/DOMAIN.com-access_log" common
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@DOMAIN.com
DocumentRoot "/opt/bitnami/apache2/htdocs/DOMAIN_FILES"
ServerName DOMAIN.com
ServerAlias www.DOMAIN.com
ErrorLog "logs/DOMAIN.com.com-error_log"
CustomLog "logs/DOMAIN.com-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@DOMAIN.com
DocumentRoot "/opt/bitnami/apache2/htdocs/SUBDOMAIN_FILES"
ServerName subdomain.DOMAIN.com
ServerAlias www.subdomain.DOMAIN.com
ErrorLog "logs/subdomain.DOMAIN.com.com-error_log"
CustomLog "logs/subdomain.DOMAIN.com-access_log" common
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@DOMAIN.com
DocumentRoot "/opt/bitnami/apache2/htdocs/SUBDOMAIN_FILES"
ServerName subdomain.DOMAIN.com
ServerAlias www.subdomain.DOMAIN.com
ErrorLog "logs/subdomain.DOMAIN.com.com-error_log"
CustomLog "logs/subdomain.DOMAIN.com-access_log" common
</VirtualHost>
bitnami-apps-vhosts.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+........"
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"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"
<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"
domain.com运行正常。有人可以帮我修复subdomain.domain.com