Score:0

How do I create a Virtual Name Host on Apache2 for a service running on localhost:8080

se flag

i have a server with apache that runs a mailing service, a wordpress multisite

I have followed guides online to make the above work

now I have a service from Vaadin (java stuff) running on localhost:8080. I can also access this through my public ip:8080.

How do I go about making a "pretty link" for the localhost:8080 service.

Could be example.com/something or something.example.com (any type of readable link is what I am after).

I tried adding the following to 000-default.conf:

<VirtualHost *:80>
ProxyPass /jenkins/ myip:8080
ProxyPassReverse /jenkins/ myip:8080
SetOutputFilter proxy-html
ProxyHTMLURLMap myip:8080 mywebsite.com/jenkins
ProxyHTMLExtended On 
</VirtualHost>

I added this below my other virtualhost *:80.

AltoFlower91 avatar
se flag
I tried to follow the guide by adding <VirtualHost *:80> ProxyPass /jenkins/ http://myip:8080/ ProxyPassReverse /jenkins/ http://myip:8080/ SetOutputFilter proxy-html ProxyHTMLURLMap http://myip:8080/ https://mywebsite.com/jenkins/ ProxyHTMLExtended On # by default only HTML output is filtered </VirtualHost> But it did not change anything. I tried both going to myip:8080 and mywebsite.com/jenkins. Nothing new there.
djdomi avatar
za flag
myip is localhost or 127.0.0.1, did you done this? and nevertheless post related information in an commentary. edit and update the question instead...
Nikita Kipriyanov avatar
za flag
Better don't change the URI path with reverse proxy; if the origin was on `localhost:8080/jenkins/`, better make it accessible as `public:80/jenkins/`. **Don't** export `localhost:8080/` as `public:80/jenkins/` or `localhost:8080/jenkins/` as `public:80/`. Avoid `ProxyHTMLURLMap`. There are certain problems associated with that, like that paths can also be put into CSS and into JavaScript code and even built dynamically within JavaScript and there is no "ProxyHTMLURLMap"-like function that is able to remap them all.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.