设置 crafter cms studio,以便通过 Apache Web 服务器代理和 ajp 连接器进行访问



我需要在创作部分设置cms工作室,以便能够从远程主机(例如VPS(访问。我正在通过Apache网络服务器代理使用Tomcat ajp连接器。 我试过像添加虚拟主机一样做:

<VirtualHost *:80>
ServerName studio
	
	DocumentRoot /home/web-apps/crafter/bin/apache-tomcat/webapps/studio
	
RewriteEngine On
ProxyPreserveHost On
# Send requests to Engine's Tomcat
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
# This is where errors related to this virtual host are stored
ErrorLog logs/mysite-error.log
# This is where access logs are stored
CustomLog logs/mysite-access.log combined
</VirtualHost>

但并没有真正成功。我只能看到默认页面,该页面始终告诉我:"Crafter CMS没有为此域配置站点。请配置要显示的网站或在创作环境中选择一个网站。 当我像 http://my_remote_host_ip/studio 一样请求它时

有谁遇到过这样的问题吗?

你所拥有的看起来是正确的。也许你可以尝试:

  • 清除 Cookie 以my_remote_host_ip
  • 清除浏览器缓存
  • 删除 DocumentRoot 指令(在这种特殊情况下并不真正需要(

这对我有用:

<VirtualHost *:80>
ServerName myserver
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
ErrorLog ${APACHE_LOG_DIR}/authoring-error.log
CustomLog ${APACHE_LOG_DIR}/authoring-access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName myserver
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/my.crt
SSLCertificateKeyFile /etc/apache2/ssl/my.key
SSLCertificateChainFile /etc/apache2/ssl/their.crt
ProxyPreserveHost On
# Studio
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ErrorLog ${APACHE_LOG_DIR}/authoring-error.log
CustomLog ${APACHE_LOG_DIR}/authoring-access.log combined
</VirtualHost>

另一种方法是在 AWS 上试用社区版,看看它是否适用于您的浏览器。然后,您可以查看其配置方式并复制配置: https://aws.amazon.com/marketplace/pp/B08374YPTP?qid=1581949339014&sr=0-2&ref_=srh_res_product_title

最新更新