Posted on July 29, 2016 at 07:25 AM
Some services run on different ports and to access them in the browser we have to mention the port number also. For ex :
SonarQube : 9000 [http://127.0.0.1:9000]
Neo4j : 7474 [http://127.0.0.1:7474]
Jenkins : 8080 [http://127.0.0.1:8080]
It is difficult to remember different server IPs alone and now we have to remember the port number too. 😕
No need of remembering all this. We can use Apache’s mod_proxy module and can define the virtual host pointing to a specific port.
Just load the following config to apache.
ProxyRequests Off
ProxyPreserveHost On
<VirtualHost *:80>
ServerName local.neo4j.com
ProxyPass / http://127.0.0.1:7474/
ProxyPassReverse / http://local.neo4j.com/
</VirtualHost>
We have defined a proxy and the process[Neo4j] will be running behind this proxy.
Note: Please make sure that you have proxy_module, proxy_html_module & proxy_http_module enabled in your apache config[httpd.conf].
For Nginx :
Just load the following config :
server {
listen 80;
server_name local.neo4j.com;
location / {
proxy_pass http://127.0.0.1:7474;
}
}
After loading these configs to server [Apache/Nginx] add the server name [local.neo4j.com] to your hosts file and browse http://local.neo4j.com, Voila, we see Neo4j server running.
Just found out another way to achieve this. Just add the following config in your httpd-vhosts.conf file.
<VirtualHost *:80>
ServerName local.neo4j.com
<Proxy *>
Allow from localhost
</Proxy>
ProxyPass / http://localhost:7474/
</VirtualHost>
Note: Please make sure that you have proxy_module, proxy_html_module & proxy_http_module enabled in your apache config[httpd.conf].
Hope this helps. 🙂
Queues and task scheduler in laravel works like a charm. But it can fail in a certain case. In this post, I am going to explain the case where it c...
Some services run on different ports and to access them in the browser we have to mention the port number also. For ex : SonarQube : 9000 [http://1...
Sometimes you need to strike off a row in ExtJS grids, this can be easily done by CSS code. The CSS code will look like this, .strike-through-row {...
When you are working on a laravel project there is some basic setup that needs to be done for each install of the project. Like Permissions for ...
In this blog, we are going to take a look into Laravel Queues. Queues allow you to defer the processing of a time-consuming task, such as sending a...
PARTIALS Let’s say we have a structure like the following : data = { students : [{ name : ‘ABC’, roll : 1 }, { name : ‘DEF&...
PHP 8 has been officially released in November 2020! This new major update brings many optimizations and powerful features to the language. This...
ProxySQL is a high-performance SQL proxy. ProxySQL runs as a daemon watched by a monitoring process. The process monitors the daemon and restarts i...
Time is important. We should not waste it doing trivial things. Automate things wherever possible.