1

I need to setup crafter cms studio within the authoring part to be able to access from remote host (e.g. VPS). I'm using Tomcat ajp connector via Apache web server proxy. I've tried do it like adding the virtual host:

<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>

But not really succeeded. I can see only the default page which always tells me: "Crafter CMS has no site configured for this domain. Please configure the site you want to show or select a site on the authoring environment." when I'm requesting it like http://my_remote_host_ip/studio

Anyone has ever challended problem like this?

baltazarr
  • 11
  • 2

1 Answers1

0

What you have looks right. Perhaps you can try:

  • clearing your cookies for my_remote_host_ip
  • clearing your browser cache
  • removing DocumentRoot directive (not really needed in this particular case)

This works for me:

<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>

Another approach is to try the community edition on AWS and see if that works with your browser. Then you can look at how that's configured and copy the config: https://aws.amazon.com/marketplace/pp/B08374YPTP?qid=1581949339014&sr=0-2&ref_=srh_res_product_title

sumerz
  • 1,346
  • 7
  • 4