3

I am using jetbrains tools to manage a team. using apache to manage my domains/subdomains. have a sub domain named dev.sepidarr.ir which is responsible as the main entry point of my development environment.

dev.sepidarr.ir.conf

<VirtualHost *:80>

  DocumentRoot /home/neacodin/domains/dev.sepidarr.ir/
  DirectoryIndex index.html

  <Directory "/home/neacodin/domains/dev.sepidarr.ir">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
  </Directory>

  ServerName dev.sepidarr.ir
  ServerAlias www.dev.sepidarr.ir

  RewriteEngine on
  RewriteCond %{SERVER_NAME} =www.dev.sepidarr.ir [OR]
  RewriteCond %{SERVER_NAME} =dev.sepidarr.ir
  RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</VirtualHost>

I want to have each jetbrains' tools running in a different url, for example I need upsource to run as dev.sepidarr.ir/upsource and hub in dev.sepidarr.ir/hub.

Based on the official jetbrains tutorial about how to setup a reverse proxy server, I have created a .conf file for hub as follow.

<VirtualHost *:80>

  ServerName dev.sepidarr.ir

  DefaultType none

  RewriteEngine on
  AllowEncodedSlashes on

  RewriteCond %{QUERY_STRING} transport=polling
  RewriteRule /(.*)$ http://localhost:8110/$1 [P]

  ProxyRequests off
  ProxyPreserveHost On

  ProxyPass /hub/ http://localhost:8110/hub
  ProxyPassReverse /hub/ http://localhost:8110/hub

</VirtualHost>

The problem is when I navigate to dev.sepidarr.ir it works fine. But when I try to open dev.sepidarr.ir/hub I get 404 Not Found.

I have also configured hub to run with a custom base-url with the following command.

./hub.sh configure--listen-port 8110 --base-url https://dev.sepidarr.ir/hub

But nothing changed.

0 Answers0