New answers tagged

0

SSL certificates should be installed on both servers (reverse proxy and the owncloud).Add in the hosts file of your reverse proxy an entry for the owncloud server i.e 192.168.1.1 myownlcoud.internaldomain.comThe domain name 'myowncloud.internaldomain.com should not be resolvable from outside.Also, add the 'fake' hostname at the reverse proxy configuration : ...


0

When you want a virtual host that only responds to queries for http://localhost do not make that virtual host available on all IP-addresses with the IP-address wildcard: <VirtualHost *:80> ServerName localhost See the manual for exact VHost matching rules but doing the above gives Apache httpd only a single discriminator to use to select which ...


0

It looks like a 'slow DoS attack' using tools like slowloris. In such type of attacks, the attacker tries to keep alive (open) legitimate connections to the server until the server hangs. We use SPA ( https://www.cyberxnetworks.com/index.php?cmd=website&aid=242 ) to stop such type of attack.


0

Just to mention to anyone who have this error, or other on apache with https have to add Listen 443 on my apache conf


0

You've got this config: <Directory /var/www/html> Options Indexes FollowSymLinks Options ExecCGI AllowOverride None Order allow,deny Allow from all AddHandler cgi-script .cgi </Directory> This tells your apache server that files ending in .cgi should be handled as scripts. But you've named your script test.py. ...


1

The :port comes from the URI scheme (RFC 3986, 3) Syntax Components: foo://example.com:8042/over/there?name=ferret#nose \_/ \______________/\_________/ \_________/ \__/ | | | | | scheme authority path query fragment 3.2.3. Port The port subcomponent of authority is ...


0

php-fpm sould fall into httpd so there's no need to create a new type. Here's a working httpd policy i wrote (tested on AMI Linux, which is RHEL based) that works with php-fpm and also has commonly needed permissions to give to httpd: module my-httpd 1.0; require { type httpd_t; type httpd_log_t; type initrc_t; type sysctl_vm_t; type ...


2

No As far as I know the current working directory is not something you can use as a security / authentication attribute in MySQL.


0

Old question but I just had this problem. You can also set the 401 errdoc in the main .htaccess if you don't want to or can't edit the protected .htaccess and you don't already have a 401 error document set.


0

For me, the problem was that the mod was not enabled in apache2. Clean Debian install, apache2 and php7 I had first to disable mpm_event mod that was enabled by default, i don't know why. By the way, mpm is a very clean way to use PHP, you should consider it instead of the apache2 mod ;) But well, to work quick : # a2dismod mpm_event # a2enmod php7.0 # ...


2

Allow can use a network address and mask, per https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow with either a mask or a number of bits. 192 to 254 (255 in fact) corresponds to the first two bits of the last (4th) byte to be set to 1. So 192.0.2.192/26 will match 192.0.2.192 to 192.0.2.255. If you really need not to match the .255 then you ...


0

SE Linux was enabled in my case. setenforce 0 to disable it (for testing purposes only)


1

Thanks all for the help. The problem was that section below was duplicated in another files. <VirtualHost *:443> </VirtualHost> However I accepted @MrWhite solution because he suggested two improvement in configuration: splitting each domain in a separate vHost and to remove HTTPS server variable. Thanks


2

RewriteCond %{HTTPS} =on RewriteCond %{HTTP_HOST} =old.example RewriteRule ^(.*)$ https://new.example$1 [R=permanent,L] It's not clear why these directives would not redirect https://old.example. However, it's not strictly correct and can be immediately simplified. For instance, it certainly won't redirect www.old.example as you are explicitly checking for ...


0

Rather than "not 301 redirecting" at all, I would expect your code to create a redirect loop. As the earlier redirect will also catch the rewritten URL (by the later directive) and redirect, etc. etc. non .php version of the pages are not 301 redirecting. Isn't that correct? Or should the "non" or "not" be removed here? both .php and non .php versions ...


0

You can use sudoers file to prevent as you want. user ALL=(ALL:ALL) /home/user/script.sh So only user can run /home/user/script.sh. Also need to make sure there is no another rule allowing user or group can run anything. It will replace above rule.


0

I discovered the source of this problem was an /etc/hosts entry on my server with the URL in it pointing to the server's external IP. At one point I must have been setting it up before DNS was ready so I entered a /etc/hosts entry on my server pointing to its own external IP: 1.2.3.4 vhost.example.com Then i set up a ServerAlias to an existing site for "...


1

Like what Sven said, using user specific hostnames (like customername.example.com) is a better solution. It is much simpler to implement and (depending on your registrar/name server provider) the DNS entries can be updated dynamically. Also, subdomain hostnames are easier to implement solution as you don't need to manage the reverse proxy, just the DNS ...


5

Set up one primary server with Apache or Nginx as reverse proxy that forwards URLS like /server2 to server2. That said, having specific host names for the customers (e.g. customername.example.com) is often a better solution - when useful, they could also use their domain name in this case.


0

AFAIK this isn't something that can (or should) be done in Apache itself. A dedicated cacher/load balancer like Varnish should be used instead.


0

Perhaps you need whitelist the IP of the server with mod_proxy_balancer on the BalancerMember servers' firewall through which Apache is connecting out to the nodes with?


0

For httpd, once the mod_userdir directive UserDir has been used, Directory can be used on the paths to alter their behavior. Including adding CGI, as mentioned in the public_html howto: <Directory "/home/*/public_html/cgi-bin/"> Options ExecCGI SetHandler cgi-script </Directory> Scripts owned by any user is annoying to secure properly. ...


2

In addition to increasing the MaxClients and ServerLimit settings to 512 you also need to raise MaxRequestWorkers to 512. Quoted from the fine manual: ... Sites which need to serve more than 256 simultaneous requests may need to increase MaxRequestWorkers ... And a little bit further: MaxRequestWorkers Directive Description: Maximum ...


0

First check what are the packages available, apt-cache showpkg <pachagename> The above command will display list of available versions for this package. Check if your version is available post that you can specify version for installation. apt-get install <packagename>=<complete version name> Example: apt-cache showpkg apache2 apt-get ...


1

At our company we have about 7000 vhosts on a Plesk VPS. In a nutshell, we create single product marketing websites for customers, where each website has it's own unique TLD. In itself this never triggered any issue for performance of Apache, but we did run into other challenges. Because we create about a 100 new websites each day, Apache needs to restart ...


Top 50 recent answers are included