I've followed all over the instruction provided in the below website.
rApache.net.
mod_R.so is installed and I've configured below things in the sites-enabled folder.
#rApacheInfo
<Location /RApacheInfo>
SetHandler r-info
</Location>
#brew function
<Directory /var/www/brew>
SetHandler r-script
RHandler sys.source
</Directory>
<Directory /var/www/brew>
SetHandler r-script
RHandler brew::brew
DefaultType html
</Directory>
But if i go to localhost:8080/RApacheInfo I get the error HTTP Status 404 - /RApacheInfo.
localhost:8080 gives me apache tomcat welcome note.
As I checked the differed between apache and tomcat from this post. Now I have a doubt whether we'll be able to install it or not.
Please help.
Errr no. Apache tomcat is a server which acts as a container for Java-based 'servlets'. Apache http server is a general server for http requests. What you have listening on port 8080 must be tomcat since you get the tomcat error page.
rApache is specifically a handler for the apache http server. Normally apache http server just sends back a file when a request for /foo.html comes in, but it can be configured to run a program via a handler, which is what rApache is.
You can run apache http server AND tomcat on the same machine, they just have to be listening on different ports. If you try and run them on the same port the second one won't start.
By default apache http server listens on port 80, so if you are running it as root then going to http://localhost/ will get a response if it is running.
Related
(This SO thread seems to be very similar, but does not answer my problem)
I have a loadbalancer listening on https://loadbalancerurl:443/
which terminates SSL and forwards requests to the IHS (IBM HTTP Server) on port 80.
I need to configure the IHS as a reverse proxy, such that requests get forwarded to https://targeturl:443/
browser --443--> loadbalancer --80--> IHS --443--> target
The reason we need to do this on the IHS, is because on that server we have direct and quick access to change the target url on demand, whereas the loadbalancer is out of our control.
This means, that i need to activate SSL in the IHS, but only for the outgoing requests to the targeturl, but not for the incoming requests.
Pages like
this from IBM
or this blog post
assume that SSL is incoming and outgoing.
Here is the relevant code block of the httpd.conf file:
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
SSLProxyEngine on
<VirtualHost *:80>
# ServerName webserverhostname # not needed so far
SSLEnable # without this i get "SSL0263W: SSL Connection attempted when SSL did not initialize."
KeyFile store.kdb # without this i get "SSL0170E: GSK could not initialize, no keyfile specified."
SSLStashFile store.sth
ProxyPass / https://targeturl/
ProxyPassReverse / https://targeturl/
</VirtualHost>
SSLDisable
where the store.kdb contains the CA certificates of the targeturl, as indicated in the SO thread
However, the server continuously spits out the following error message:
SSL0227E: SSL Handshake Failed, Specified label could not be found in the key file, or the specified label is not a 'personal certificate' (no private key). Label='(null)'
As far as i understand, this means that IHS is failing to handle incoming https traffic, which should not happen. It should not happen because the <VirtualHost *:80> specifies port 80, and also because any traffic that reaches the IHS has the SSL terminated by the loadbalancer.
Am i misunderstanding the error message? If not, how can i get this working?
edit to show working solution:
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
SSLProxyEngine on
<VirtualHost *:80>
# ServerName webserverhostname # not needed so far
# SSLEnable # this would activate SSL for incoming traffic
KeyFile store.kdb # this contains the CA certificates of the target server
# SSLStashFile store.sth # would only be needed for incoming SSL
ProxyPass / https://targeturl/
ProxyPassReverse / https://targeturl/
</VirtualHost>
# SSLDisable
SSLEnable should not be present in a virtual host that doesn't actually handle inbound SSL.
SSLStashFile is also not needed. It is unfortunately named.
You should deep dive on the error_log entries you get in the config without these two. There is likely an early SSL error that does not fail startup. The only necessary config even without frontend SSL is just:
SSLProxyEngine on
ProxyPass / https://example.com/
KeyFile /path/to/key.kdb
I need to deploy a Nuxt.js SSR web application on a centos server. Plesk control panel is already on the server so I need to proxy all requests from example.com to localhost:3000 except plesk control panel which is example.com:8443 and an API URL which is example.com/api/v1 (API is in the WWW folder). The Web server used is nginx.
I tried to use nginx proxy mode, but then I can't get access to API or plesk control panel anymore.
I expect to have 3 vhosts on one IP:
www.example.com for web application
www.example.com:8443 for plesk control panel
www.example.com/api/v1 for API
For those with the same problem. this is how i solved it:
go to Plesk control panel/ websites and domain/ Apache and Nginx settings
in Additional Apache directives section you can add your apache code:
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
<Location /API/>
ProxyPass !
</Location>
at first sorry for my bad english.
I am using Plesk 12 on my Ubuntu 14.04 Server. In the past i made Tor hidden services for my Domains simply whit the Apache virtual Host Files. And it Works fine.
But now i am using Plesk and now i dont understand hor to make a Exsiting Site reachable over a Hidden Service.
The Site www.example.com is available an the Host settings are :
<VirtualHost 85.214.50.74:7080 >
ServerName "example.com:80"
ServerAlias "www.example.com"
ServerAlias "ipv4.example.com"
ServerAdmin "admin#example.com"
.....
Now i added a second Virtual host :
<VirtualHost 85.214.50.74:8081 >
ServerName "xxxxxxxxxxxxxxxx.onion:80"
ServerAlias "xxxxxxxxxxxxxxxx.onion"
ServerAdmin "admin#xxxxxxxxxxxxxxxx.onion"
......
In the Torrc the Hidden service ist Corret and it generated a kex and a hostname. But if i reload Apache and Nginx and restart Tor, i cant reach the Hidden service.
You shouldn't add the onion site as a virtual host. Apache doesn't serve the requests to the .onion site directly.
Instead, edit your torrc file and add something like:
HiddenServiceDir /var/lib/tor/example.com
HiddenServicePort 8081 127.0.0.1:80
This runs a hidden service on port 8081 that proxies to port 80 on the local host. When you first start Tor it will generate all the keys and the onion address for your site which you can find in /var/lib/tor/example.com/hostname
If you have multiple virtual hosts, you might need to change the HiddenServicePort to use the hostname (or serveralias), but make sure it resolves locally so you're proxying to the local machine.
Hello I am trying to create a website in multiple languages. Every language has it own virtual subdomain. So for example here are some urls:
nl.foo.eu, fr.foo.eu, de.foo.eu
My domain that generates all the content is foo.eu, it generates the content and translates it to the right language.
This is done with wordpress and the plugin qTranslate-X.
But everytime when I go to an url like nl.foo.eu the page returns an internal server error 500.
So my question is: Do i need to configure something in my DNS to make this possible?
And could I be doing something else wrong?
I went trough the error log of the server and this is the error i am retrieving:
[Fri Apr 17 09:53:21.028095 2015] [core:error] [pid 731951] [client 12.34.56.78:50514] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
I configured my environment this way:
select "Use Pre-Domain Mode (uses http://en.yoursite.com)" in the advanced settings of domain
add DNS records; in my hosts file, I added this:
127.0.0.1 www.example.com
127.0.0.1 en.example.com
127.0.0.1 example.com
check that your web server is properly configured. I'm using Apache and I have this configuration with wildcard in ServerAlias:
<VirtualHost *:80>
DocumentRoot /wamp/www/example
ServerName www.example.com
ServerAlias example.com *.example.com
AcceptPathInfo On
</VirtualHost>
I hope this can help you
I have a computer at home running Ubuntu 10.10. I am trying to make a server and host my own website, and I am running a LAMP (Linux, Apache, MySql, PHP) server. But my IPS blocks incoming traffic on port 80. To get around this, I want my server to take HTTP requests from port 8080, in addition to port 80. But after I tried to add port 8080 to the accepted ports file, my browser cannot access it. It says "The server at mywebsite.com is taking too long to respond.". Does anyone know why it is timing out and not returning the webpage, or how I can fix this? Here is what I've done so far:
The port.conf file contains:
NameVirtualHost *:80
Listen 80
Listen 8080
The apache2.conf file contains:
# Include the virtual host configurations:
Include sites-enabled/
NameVirtualHost *:80
NameVirtualHost *:8080
The sites-available/default file contains:
<VirtualHost *:80 *:8080>
ServerAdmin webmaster#localhost
Lastly I restarted apache:
$: /etc/init.d/apache2 restart
All this, as far as I can tell, should add port 8080 to for HTTP requests. When I type in "localhost" or "localhost:8080" into the web browser, it returns my website. If I type in "mysite.com" or "mysite.com:80", the site also works. But my website does not work when I search for "mysite.com:8080"; rather it times out. The reason "mysite.com:80" works is because I am accessing the site from within my local network, so I don not need to go through the modem, which would block port 80. Does anyone know why this is not working?
FIX: I'm dumb and forgot to add port 8080 on the list of acceptable ports on my Ubuntu firewall.
Have you had a look at the requests with wireshark or something like that? localhost will be going through the loopback device, and I'm guessing that when you request mysite.com the request is going out over a real network device. Check whether the request is getting back in again from your network - port 8080 might be blocked somewhere else.