Running a perl script from proxy in Apache xampp - apache

I'm using Windows 10 OS. I have used
<VirtualHost *:9001>
ProxyRequests On
<Proxy>
Order deny,allow Allow from all
</Proxy>
ProxyPass / http://localhost:8080/App/ ProxyPassReverse /
http://localhost:8080/App/
</VirtualHost>
for doing the proxy settings. I have created a virtual host.
Can anyone suggest me how to run a Perl script from here by giving the document root and call the Perl script from proxy settings?

Related

AEM: Using Reverse Proxy - Dispatcher

Could you please let me know how can we use reverse proxy to allow non aem server to post pages to a directory on the main domain on AEM site (Eg: www.yourdomainname.com/test-one)?
I have tried adding the below syntax in the vhost file in dispatcher module of Apache server for using reverse proxy. However, this didn't work and faced a 404 on dispatcher upon server restart. The reason might be dispatcher reverse proxies to the publish instance. How can we bypass this issue to setup reverse proxy?
<VirtualHost *:80>
ServerName www.yourdomainname.com
ProxyRequests off
RemoteIPHeader X-Forwarded-For
Header set xxx-Proxy-Version "1.0"
ProxyPreserveHost On
<Location /test-one >
ProxyPass "http://xxx/test-one"
ProxyPassReverse "http://xxx/test-one"
Order allow,deny
Allow from all
</Location>
<Location /test-one/(.*) >
ProxyPass "http://xxx/test-one/(.*)"
ProxyPassReverse "http://xxx/test-one/(.*)"
Order allow,deny
Allow from all
</Location>
</VirtualHost>
Thanks

Odoo Set Access Url By Domain In VPS

I installed odoo 10 in centos 7 by this tutorial
https://www.rosehosting.com/blog/install-odoo-10-on-centos-7-with-apache-as-a-reverse-proxy/
working well, I can access odoo by url ip:port, i.e (192.168.1.1:8069)
But the problem is, I'm using odoo 10 in VPS (Virtual private server with centos 7 as operating system),
how can i access odoo without ip address ? I want to access odoo by domain (like www.domain.com), Anyone can help me to do this?
I try this code, but does not works
<VirtualHost *:80>
ServerName joko.jubaedah.com
ServerAlias www.joko.jubaedah.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://joko.jubaedah.com:8069
ProxyPassReverse / http://joko.jubaedah.com:8069
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
I want access odoo by domain such as
www.joko.jubaedah.com (using sub domain concept)
or
www.jubaedah.com/joko
Thanks in advance.
Open odoo.conf by nano /etc/odoo/odoo.conf and change
xmlrpc_port = 8069 to your port and restart by systemctl restart odoo.
And Configure Apache:
yum install httpd
Enable it to start on boot, then start Apache:
systemctl enable httpd
systemctl start httpd
Proxy configuration. Open a new config file for your domain:
nano /etc/httpd/conf.d/your_domain.conf
<VirtualHost *:80>
ServerName your_domain.com
ServerAlias www.your_domain.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://your_domain.com:8069/
ProxyPassReverse / http://your_domain.com:8069/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
service httpd restart

How to use apache to redirect to docker container

I have two docker containers running Tornado applications, named app1 and app2 on a Ubuntu VM. The VM has a domain name ubuntu.somesite.com. I can access one of them with docker port forwarding at ubuntu.somesite.com:8080. Instead I want both apps to be accessible at ubuntu.somesite.com/app1 and ubuntu.somesite.com/app2. What would be the best way to accomplish this? I tried using apache virtual hosts but didn't get very far.
You need to expose both docker containers on the host network, of course on two different ports (let's say 8080 and 8081).
Than you need a reverse proxy in your host. Apache 2.4 is one possible choice.
You could use a virtualhost like this:
<VirtualHost *:80>
ServerName ubuntu.somesite.com
<Location />
Order allow,deny
Allow from all
Require all granted
</Location>
ProxyPass /app1 http://127.0.0.1:8080/
ProxyPassReverse /app1 http://127.0.0.1:8080/
ProxyPass /app2/ http://127.0.0.1:8081/
ProxyPassReverse /app2/ http://127.0.0.1:8081/
</VirtualHost>
Please note that this config will not work with apache 2.2 or older.

unable to revere proxy jenkins using apache

I have installed Jenkins and apache2 on my Ubuntu-16.04 serverand both are working fine. Now i want to deploy or configure reverse proxy for jenkins using apache.
Took help from this site to configure. I configured everything as per my need. My configuration file under sites-available folder ci.conf looks like
<Virtualhost *:80>
ServerName jenkins.tre.com
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
ProxyPassReverse / http://jenkins.tre.com/
</Virtualhost>
and system hostname abd domain name is
root#tre:~# hostname
tre
root#tre:~# domainname
(none)
When i restarted apache & jenkins and tried to access http://jenkins.tre.com/ the page is not opening, can anyone help me with this.... since iam very much new in to this thing.

Error in Redirect from Apache to Tomcat using mod_proxy

I have apache and Tomcat in my server and im using mod_proxy to redirect from Apache to Tomcat... the apache is running on port 80 and tomcat is running on port 8080
here is my virtual host :
<VirtualHost *:80>
ServerName www.example.ir
ServerAlias example.ir
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8080/example
ProxyPassReverse / http://localhost:8080/example
<Location "/">
Order allow,deny
Allow from all
</Location>
</VirtualHost>
But the problem is when I try www.example.com i get the following error :
HTTP Status 404 - /exampleexample/
so whats wrong with my configuration ?
Thanks and sorry for my poor english
Do you want to execute Tomcat's examples webapp? If this is the case, try following configuration:
ProxyPass / http://localhost:8080/examples/
ProxyPassReverse / http://localhost:8080/examples/
After restarting your Apache, navigate to http://yourhost/.
Hope this helps.