#StackBounty: #apache #tomcat #webserver #reverse-proxy #httpserver http configuration to connect different type of backened app server…

Bounty: 50

I have a apache http server that acts as proxy to connect to backened app servers.

e.g. MachineA(https) -> MachineB(http:reverseproxy) -> MachineCn(http:App)

Here MachineA(Public_lb) port 9002 is mapped with MachineB(internal apache) port 7777.

In backened, I have different application servers running

for e.g.

  1. MachineC1 -> Weblogic
  2. MachineC2 -> Tomcat
  3. MachineC3 -> NodeJS
  4. MachineC4 -> Flask

Here there is single servername(MachineA: public_facing_lb) and port(9002). Here is my existing configuration in MachineB(apache reverseproxy server)looks like which works fine now for all weblogic connections. But when I add the proxy for other apps, it never works properly.

What I am doing wrong here ?

LoadModule weblogic_module   "/u01/oracle/ohssa/ohs/modules/mod_wl_ohs.so"

RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteRule ^$ http://%{HTTP_HOST} [L,R]



    <IfModule mod_weblogic.c>
       NameVirtualHost *:7777
      <VirtualHost *:7777>
        ServerName https://public_facing_lb:9002
        RewriteEngine       On
        RewriteOptions inherit
        RewriteRule ^/$ /pod/reactaphome [PT]
        Debug ALL
        MatchExpression /
        DebugConfigInfo ON
        WLLogFile /var/log/httpd/wlproxy-qa.log
        KeepAliveEnabled ON
        KeepAliveSecs  15
        WLProxySSLPassThrough ON
        ProxyPreserveHost On


     <Location /pod/reactapp1>
       ProxyPass  http://nodejssrv1:1337
       ProxyPassReverse  http://nodejssrv1:1337
     </Location>

     <Location /pod/flaskapp1>
       ProxyPass  http://flasksrv1:8080
       ProxyPassReverse  http://flasksrv1:8080
     </Location>

     <Location /pod/tomcatapp1>
       ProxyPass  http://tomcatsrv1:8080
       ProxyPassReverse  http://tomcatsrv1:8080
     </Location>

     <Location /pod/console>
        SetHandler weblogic-handler
        WebLogicHost wlssrv1
        WeblogicPort 7001
        WLSRequest On
        ProxyPass  http://wlssrv1:7001/console
        ProxyPassReverse http://wlssrv1:7001/console
     </Location>
        SetHandler weblogic-handler
        WebLogicHost wlssrv1
        WeblogicPort 7001
        ProxyPass /pod/wlsapp1 http://wlssrv1:7001/wlsapp1
        ProxyPassReverse /pod/wlsapp1 http://wlssrv1:7001/wlsapp1
        ProxyPass /pod/wlsapp2 http://wlssrv1:7001/wlsapp2
        ProxyPassReverse /pod/wlsapp2 http://wlssrv1:7001/wlsapp2
        ProxyPass /pod/wlsapp3 http://wlssrv1:7001/wlsapp3
        ProxyPassReverse /pod/wlsapp3 http://wlssrv1:7001/wlsapp3

        ProxyPass /wlsapphome/global http://wlssrv1:7001/resources/getGlobalAppsList
        ProxyPassReverse /wlsapphome/global http://wlssrv1:7001/resources/getGlobalAppsList
        ProxyPass /wlsapphome http://wlssrv1:7001/resources/getAppsList
        ProxyPassReverse /wlsapphome http://wlssrv1:7001/resources/getAppsList

     </VirtualHost>
    </IfModule> 

I might be doing mistake in putting the other app config inside the weblogic if module.
If I am creating multiple virtual hosts, at any point of time only the first virtualhost works.

Do I need to load modules for tomcat, nodejs and flask to communicate, as the pages get loaded broken. Like mod_wl_ohs used for weblogic ?


Get this bounty!!!

#StackBounty: #linux #open-source #web-browser #wordpress #apache A single-conf, virtual-host-free, webserver for a few small-volume Wo…

Bounty: 100

I have a DigitalOcean/Linode 5$ Ubuntu 16.04 machine with Bash and Nginx on which I have a few very small WordPress websites (see below).

  • Up to 20 webpages each.
  • Up to 20 images/animations in each website (usually, each image/animation file doesn’t weigh more than 250kb).
  • up to 1 video in each site (any video is embedded from YouTube/DailyMotion).

Current state

I’ll explain the current state in three parts:

  1. Even though I raise my own sever environments on DigitalOcean/Lindoe, I often don’t have the spare time to give on research for solving problems in Apache/Nginx (see below).

  2. Given my sites are basically identical data volume, and more or less spend the same amount of machine and webserver resources, I’d like to ask the following.

  3. I don’t want to use a shared server if I have a better option with minimally-managed-cloud like DO/Linode, and I don’t want a maximally-managed-cloud because these are usually very expansive.

Desired state

Is there a free software and gratis webserver, which isn’t Apache or Nginx, which includes object caching, that I could install on my machine without needing to configure pretty much anything? Just something with 1 directives similar to all sites.

I must have the time I spend on configuring Apache/Nginx on things like site building and marketing, this is mainly from survival reasons.

Please help me. I know this question might be a better fit for Software Recommendations StackExchange, but I ask to keep it here or at least close it and comment otherwise I could find myself without a rooftop.

My question

What software would you regard as the most fitted?


Get this bounty!!!

#StackBounty: #webserver #apache #ddos Is mod_reqtimeout a sufficient and safe technique to mitigate Slow HTTP DoS Attacks?

Bounty: 50

We’ve been looking into configuring apache against the Slow HTTP DoS Attacks and stumbled upon this article, which goes over multiple techniques and apache configuration options.

mod_reqtimeout module looks promising and we are considering enabling it, but not everything is clear about it at the moment:

  • what header, body and minRate settings are considered best practices and what things should we take into account when choosing the values?
  • can enabling mod_reqtimeout potentially impact web applications running on this web server? And, if yes, what possible problems should we expect?


Get this bounty!!!

#StackBounty: #apache #.htaccess #redirect htaccess if url contains string redirect to page without changing url

Bounty: 50

I have a URL like domain.co.uk/product-name.html

I want to redirect any URL’s that contain the string html to search.php but I want to keep the original url that was typed in, so if domain.co.uk/product-name.html was redirected to search.php it should still show domain.co.uk/product-name.html in the browser

I am using:

RewriteCond %{REQUEST_URI} html
RewriteRule .* search.php

Which redirects but does not keep the original typed URL in the browser.

How can I do this?


Get this bounty!!!

#StackBounty: #ruby-on-rails #apache #ubuntu #capistrano #passenger Passenger doesn't seem to be running (Capistrano/Rails/Apache/U…

Bounty: 50

Deploying a Rails app using Capistrano to an Ubuntu VM running Apache with Passenger enabled.

I followed this tutorial: https://www.phusionpassenger.com/library/install/apache/install/oss/trusty/ with a few changes given that I’m on 17.04, not 14.04 LTS.

passenger-config validate-install says everything looks fine with both Passenger and Apache. passenger-memory-stats shows both Passenger and Apache processes.

I have sudo apache2ctl restarted several times, with no warnings. But passenger-status, and therefore the passenger-config restart-app that Capistrano runs, reports that Passenger “doesn’t seem to be running.” So my deploy stops.

There’s only one Ruby on the machine, ruby-2.4.1 installed using ruby-install. I have apt-get update and upgraded in case of version mismatches.

Apache logs don’t show any errors, certainly none related to Passenger.

Why would Passenger internally disagree, saying that it’s both configured properly and there are processes running, but then later saying that it’s not running?


Get this bounty!!!

#StackBounty: #node.js #apache #socket.io #phpwebsocket #phpws Trying to create a socket between servers with SocketIO and PHPws

Bounty: 50

I’m having a bit of an issue with websockets. So, I have a Rpi that provides me some data through a socketIO client in a pretty simple way. The following code shows how do I get to get this data:

<!DOCTYPE html>
<html>
<header>
    <title>SocketIO test</title>
    http://192.168.5.5:8000/socket.io/socket.io.js
</header>
<body>
    
        var client = io.connect('http://192.168.5.5:8000');
        client.on('connect', function() {
            console.log('connected');
        });
        client.on('raw', function(data){
            console.log(data);
        });
        client.on('state', function(data){
            console.log(data);
        });
    
</body>

However, what I need to implement is a little bit more complex. I need to use a Apache server to trait some of the data before it gets to the client side. The following image shows what I attempt to build:

enter image description here

To reach my goal I tried several WebSocket Servers and Client libraries for PHP until I found PHPws, which looks like the best solution for my scenario.
So, I read the examples, I test them and everything went well until I tried to connect to the Rpi with the following code:

require_once("../vendor/autoload.php");
$loop = ReactEventLoopFactory::create();
$logger = new ZendLogLogger();
$writer = new ZendLogWriterStream("php://output");
$logger->addWriter($writer);

$client = new DevristoPhpwsClientWebSocket("ws://192.168.5.5:8000", $loop, $logger);
$client->on("connect", function() use ($logger, $client){
    $logger->notice("Or we can use the connect event!");
    $client->send("Hello world!");
});
$client->on("raw", function($message) use ($client, $logger){
    $logger->notice("Got message: ".$message->getData());
    $client->close();
});
$client->open()->then(function() use($logger, $client){
    $logger->notice("We can use a promise to determine when the socket has been connected!");
});
$loop->run();

I’ve more or less taken this example from Devristo’s github.

From the server side, the execution of the program is not throwing any error or message.

Is it possible to build what I want to build here with PHPws?
If so, am I connecting properly to de Rpi server with PHPws sample code shown?


Get this bounty!!!

#StackBounty: #apache #http-status-code-403 #plesk Random 403 error with apache 2.2 and Plesk 12.5

Bounty: 50

I face strange random 403 error on a Debian serveur with Plesk 12.5 and apache 2.2.

There are several domains on the server but only one domain faces this.

Rondomly, it seems that it tries to display the directory listing instead of serve the index.php file. So, sometimes, it through a 403 error and when refresh the page, it’s ok with a 200 status.

In error_log, I read lots of :

[error] [client xxx.xxx.xxx.xxx] Directory index forbidden by Options directive

The DirectoryIndex was not present in httpd.conf file so I added the rule in additional directives for the domain via the Plesk Web Interface with no luck.

I’m kind of stuck with this.

Any help would be appreciated.

Let me know if you need more info.

Thank you.


Get this bounty!!!

#StackBounty: #php #apache #http-status-code-403 #fpm Random 403 errors with apache+php-fpm

Bounty: 100

On a server of mine, running Ubuntu 14.04.5 with Apache 2.4.23 and php-fpm 7.0.11, I’m getting random 403 errors.

I say “random” because the page I see in logs with 403 are running fine when I try them. Also, I experienced directly (I mean by visiting a site on the server with my browser) that I got a 403 error, then retried (just refreshing) and I got a 200.

The server is running some websites (about a dozen), with various kind of solutions (a couple of WordPress, a few old spaghetti php apps, mostly modern apps based on Symfony framework).

I’d also be happy if someone can point me to some way to increase the verbosity of some logs, to try resolving this issue on myself. Currently I see the 403 errors in the apache logs of vhosts.


Get this bounty!!!

#StackBounty: #apache #polymer Polymer app not loading when using Apache reverse proxy

Bounty: 50

I have a Polymer app running on port 5901 of my VM, and am using Apache reverse proxy to serve the app from the following URL:

http://www.example.com/polymer

The problem is when I go to the URL in a browser, I can see the page title but the page is blank. I also get this error in the console:

Failed to load resource: the server responded with a status of 404 (Not Found)   src/home-page.html

I’m assuming that I have to somehow add the /polymer subdomain to the default URL for the app, but I’m not sure how to do this.


Get this bounty!!!

#StackBounty: #php #apache #caching #xampp How to disable Apache caching in Apache-XAMPP?

Bounty: 50

I am having this weird problem with my XAMPP-Apache.
I am making an log-in system where form is posted to redirect.php page.
I updated the redirect.php and but still it is showing me the same old result.
There is not even a single line to redirect(header fn call) it to another page but still it redirects to home.php page as it was doing in older script.
I tried clearing cache of my browser and changing the browser for testing but didn’t work…I even tried rebooting the server but no change.
Please help me through….


Get this bounty!!!