New answers tagged

0

I just came across the same issue. Here's my solution since mod_auth_pam is dead and no one has addressed the original question, "authenticate via local system accounts...in a specified group" I'm using Ubuntu 18.04, so flavor the package installation to your own system. For this example, I'm hosting a directory /var/www/data and only want users ...


0

As this question is 11 years old now but still a current problem, I thought I'd give a more complete answer on how to solve it. To enable %F2 and %5C in your paths without getting a 404 error, you'll need to add the following line to your apache2 config: AllowEncodedSlashes NoDecode From the Apache2 documentation: The AllowEncodedSlashes directive allows ...


0

Enable header module using below command sudo a2enmod headers You have to restart your apache once you are done with enabling module sudo service apache2 restart


0

The above answers are old and no longer work for my modern Fedora Server 31 / 32 and Apache 2.4. Here's what does: httpd -t -D DUMP_MODULES But, there is a caveat that this will only work if you have an appropriately configured /etc/httpd/conf/httpd.conf, so if you're in the middle of editing to set LogLevel, it won't work if your edits are in-progress and ...


0

<IfModule mod_rewrite.c> No need for the <IfModule> wrapper. See this question on the Webmasters stack: https://webmasters.stackexchange.com/questions/112600/is-checking-for-mod-write-really-necessary #1 If the requested file is not url-mapper.php (to avoid .htaccess loop) RewriteCond %{REQUEST_FILENAME} (?<!url-mapper\.php)$ There's no ...


0

It seems like you are mixing up two things. You install the geoip extension for PHP. However, $_SERVER['GEOIP_COUNTRY_CODE'] is populated by Apache mod_geoip module. Install Apache module sudo apt install -y libapache2-mod-geoip Modify the file /etc/apache2/mods-enabled/geoip.conf and remove the # in front of GeoIPDBFile - and set GeoIPENable to On: ...


0

Maybe Apache doesn't know when to use the php module? I found this apache cwiki AddHandler application/x-httpd-php .php .phtml Action application/x-httpd-php modules/libphp5.so This how I started the container: docker run --publish 9090:80 -v /tmp/project:/project kuborgh/php-5.2 /tmp/project is world read-, write- and searchable, the first index.php I ...


0

Try something like the following: Options -MultiViews RewriteEngine On DirectoryIndex index.html # Abort early if request is already for index.html in the root RewriteRule ^index\.html$ - [L] # Request a directory - check for index.html in that directory # (Excludes the document root) RewriteCond %{REQUEST_FILENAME} -d RewriteRule %{DOCUMENT_ROOT}/$1/...


0

You can use the RewriteCond conditions -f and -d to check for existing files and directories, respectively: RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] # Apache will stop here if a file or directory exists. # Add whatever you need afterwards, for example: RewriteRule . index.html [L]


0

I checked the firewall demon on the guest and realized it was running and I stopped it and I could now access the Installed EBS (Oracle Enterprise Business Suite) on the host. See below: [root@ebs]# systemctl status firewalld ‚óŹ firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; ...


0

It's proper separation of concerns and generally best practice to run a normal web server in front of your app servers. Your app server is generally written to serve a specific business purpose, and adding unnecessary things to it is usually considered a waste of time and money unless there is a compelling reason why a web server can't be used. (This is rare ...


0

In addition to the answers given here (especially the one from @Jason Blevins), there is a potential pitfall here. It took me some time to figure this out. As stated, Apache will use the first VirtualHost entry if no other entry matches einther the HostName or HostAlias directive. However, be careful when you mix virtual hosts that are tied to a specific IP ...


1

How would I go about restarting Apache with a PHP script while keeping correct security measures on a production server? You can't or, even if you can, you really shouldn't. ... restarting Apache requires the use of sudo or root privileges, both of which PHP don't normally have access to. Nor should it. PHP Runs "within" the Apache environment ...


1

Your regex is not terminated. You specified a delimiter # but it never appears at the end of your regex. Further, it then contains a / followed by a ^, which means the beginning of a string. This can never match because the / precedes it. Of course since you have a greedy match .* following the / and are working with a URL path, the / is superfluous and can ...


0

Old question, but the answer should be pretty timeless: If you can at all, my recommendation would be to keep servers and software up-to-date and in the state recommended by the distribution managers. The alternative if there are no supported and trusted third-party repositories for the software version you need to run, is to compile your version from ...


0

I hit the same problem, I could not figure out which module sets the Expires header to 12 hours. I decided not to use mod_expires at all. (even after I disabled the mod_expires module, aparently another module sat Expire headers, I was not able to find which module did that) So the way I approached the issue: Header unset Expires # Activate browser-caching ...


2

The solution is to use the AuthnProviderAlias directive. <AuthnProviderAlias ldap ldap-alias1> AuthLDAPBindDN cn=youruser,o=ctx AuthLDAPBindPassword yourpassword AuthLDAPURL ldap://ldap.host/o=ctx </AuthnProviderAlias> <AuthnProviderAlias ldap ldap-other-alias> AuthLDAPBindDN cn=yourotheruser,o=dev AuthLDAPBindPassword ...


0

Assuming site2 resides on a different vHost/server then you could do the following using a mod_alias RedirectMatch: RedirectMatch 302 ^/client/([a-z]+)$ https://site2/$1 This assumes "usernames" are restricted to lowercase a-z letters, as in your example. But it still allows usernames of just 1 character. However, if you have existing mod_rewrite ...


0

It is surprisingly difficult to find an answer to this question. I ended up finding this obscure 2003 forum post. The solution seems to be that you just disable the cronjob for logrotate at which by default is maybe at /etc/cron.daily/logrotate. This disables all rotation of logs everywhere on the machine, which is what I wanted. If you only want to do this ...


1

This was lifted up on the front page and I think the answer back from 2013 was based on an assumption that certificates are expensive and that OP can't buy one for example.com. In this era of free Let's Encrypt certificates there's only one answer: Get a certificate for the redirection. (Getting Started with Let's Encrypt). Create a simple redirection, ...


0

We had exactly the same issue and it is a pity that here are only useless answers. This is not an svn problem, it is a nginx issue. As the OP mentioned in a comment, this has to do with whitespace (or other chars that needs url encoding) in the path. There happens an overencoding, so that the path is wrong, when it reaches svn. Old open bug at nginx But ...


0

I tried all the above mentioned solutions and nothing worked in my case. Finally I realized that problem is caused due to "shmcb" which basically refers to apache socache_shmcb module. This was disabled in my httpd.conf and enabling it solved the issue. Therefore, to resolve this problem uncomment the following line in your httpd.conf: LoadModule ...


1

It should work can you try? <If "-d /var/www/html"> DocumentRoot "/var/www/html" </If> <Else> DocumentRoot "/var/www/html2" </Else>


0

Try this: ##### SetEnvIf Request_URI ^/admin1 auth=1 SetEnvIf Request_URI ^/admin2 auth=1 SetEnvIf Request_URI ^/admin3 auth=1 AuthName "Please login" AuthType Basic AuthUserFile /path_to_file_which_contains_user_login_pwd/.htpasswd ## first, allow everybody Order Allow,Deny Satisfy any Allow from all Require valid-user # then, deny only if ...


1

The "right" way to update everything is from dependencies to the top, so the order should be : HTTP/2 and Apache, upgrading Apache will allow you to use HTTP/2, PHP have (almost) nothing to do with it. MySQL PHP to 7.3 (optional) PHP to 7.4 AFTER PHP 7.3 Apache Upgrading Apache will be the easiest part because there is not much dependencies ...


0

I had similar issues. I solved the problem by removing the Transfer-encoding header from the response, directly in the application.


1

Looks like your Apache server is still running. (So is your Node app.) You should kill it yourself if the Bitnami scripts failed to stop it.


Top 50 recent answers are included