Tag Info

New answers tagged

1

To enable: #sudo a2enmod [module name] To disable: #sudo a2dismod [module name] https://www.gtechhub.com/linux-command/how-to-enable-and-disable-apache-modules-a2enmod-a2dismod/


1

Yes apache have simple command to list all enabled modules: #sudo apache2ctl -M Refer detailed description https://www.gtechhub.com/apache/how-to-list-out-all-installedactivated-apache-modules-on-a-server/


0

Turns out the first non-UCC certificate was under the same CommonName as the UCC certificate. Simply using the UCC certificate on all the VirtualHosts sovled the issue.


0

We ended up solving this issue by using another rule to not scan the URI. SecRuleUpdateTargetById 950120 !ARGS:REQUEST_URI This way this particular rule would not scan the URI but would still be scan the rest of the packet. It should be noted that this rule needs to be replicated for every rule you have.


0

There is no command for this. You should ask your hosting provider to examine log files. Probably you have some backdoor with your CMS files. It uses your system() or similar function to manage the malicious PHP files. So, first of all, you should disable dangerous PHP functions exec/shell_exec/system/passthru for you account.


0

If you invoke the unix command ls -l (path-to-file) that should reveal the owner of the files. Use the popen() function so you can get stdout. Of course, if someone maliciously put them there, then the file owner information may not reflect who really put them. But I guess that and the timestamp on the files may give you some leads. Instead of using a ...


2

I suspect my case is the same as user242156, and very possibly, the original poster. The issue was that my configuration files in sites-enabled/ were not in fact being read, because the distro's apache2.conf only included sites-enabled/*.conf and my files did not use that extension, as it is not required on, e.g., Ubuntu. So the correct solution is rename ...


0

As far as I'm aware it is not possible to blanket ignore any particular part of the request (be it URI or any parameters) from all configured ModSecurity rules. While that may be useful it would likely open up a number of security holes. So you just need to see which rules are failing and add white list exceptions for those rules. If you give examples of ...


0

Try add this port to allowed ports: semanage port -a -t http_port_t -p tcp 8109 To list allowed ports use: semanage port -l | grep -w http_port_t Default settings are: http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000


0

Solved it :) When I installed HHVM I ran the below shell script which set HHVM and changed some configurations. sudo /usr/share/hhvm/install_fastcgi.sh I'm not sure exactly what this did but I'm almost certain it is what caused the issue as when I ran the below uninstall script which also comes with HHVM it fixed everything and now Apache works also. $ ...


1

You are on the right track; iptables is the right command. However, you are not looking at the 'nat' table. Try the following which will list how the ports are forwarded on your host. sudo iptables -L -t nat


-3

I had the same exact problem, and what worked for me was unbelievably simple edit /etc/apache2/ports.conf (for ubuntu, or httpd.conf ) change "Listen 443" to "Listen 443 http" under ssl_module


0

My vhosts file is automatically generated so I added to the script this lines RewriteEngine on RewriteCond "%{REQUEST_URI}" "^/condition" RewriteRule "^/(.*)$" "https://www.google.com/" [R=permanent,L] to be inserted for each vhost and now its working fine.


1

You can use Apache's ForceType directive, explained in the documentation. You have to use it in a Directory, Location, or Files context. For JSON, you'd want to use ForceType application/json. So, in your vhost, you'd likely want to do something like: <VirtualHost *:80> <Location /> ForceType application/json ...


1

You might have php5-fpm listening on a unix socket (like /var/run/php5-fpm.sock, while Apache tries to connect to 127.0.0.1:9000. Check the listen-directive in your php5-fpm configuration (I'm guessing /etc/php5/fpm/pool.d/www.conf). And then either configure Apache to use the unix socket or reconfigure both php5-fpm and nginx to use network sockets (a ...


0

On Apache httpd 2.4.7 and earlier: The ephemeral/anonymous DH ([EC]DHE, those providing perfect forward secrecy) will be computed automatically from standardized DH primes (parameters) whose size is based on the server certificate's modulus (namely 2048/3072/4096/6144/8192, or still 1024 if the certificates is a -not recommended- 1024 bits one). ...


0

Could you use a Redirect? <VirtualHost> ServerName foobar.com Redirect / http://www.foobar.com ... </VirtualHost>


0

You're almost right and correct solution to avoid double compression is: # Let only mod_deflate handle compression SVNCompressionLevel 0 SetOutputFilter DEFLATE It disables SVN compression for deltas while enabling HTTP compression for all responses. But there are several caveats: Subversion client doesn't compress HTTP request body since it doesn't ...


1

Sounds like you want something like: <VirtualHost *:80> ServerName host.example.com ProxyPass / http://docker.example.com:1234 ProxyPassReverse / http://docker.example.com:1234 </VirtualHost> Replace host.example.com with the actual host name for the virtual host. Replace docker.example.com with the actual host name or IP for the Docker host. ...


1

When you hit F5 in a browser, you are instructing the browser to ask the sever and any proxies in the path for new content. That Cache-Control request header does just that. It does not get added during normal navigation. Also, PHP has no way of knowing that your content didn't change, especially if it is making a database call. It will never return a 304 ...


0

From SVN Book Be sure that when you define your new Location, it doesn't overlap with other exported locations. For example, if your main DocumentRoot is exported to /www, do not export a Subversion repository in <Location /www/repos>. If a request comes in for the URI /www/repos/foo.c, Apache won't know whether to look for a file ...


0

Thanks for the above answer and it points me to the right direction. In my case, the 301 redirect is caused by a rewrite rule for the whole site. RewriteEngine on RewriteCond %{HTTP_HOST} ^voicent.com RewriteRule ^/(.*)$ http://www.voicent.com/$1 [L,R=301] The above rule forces the use of canonical host name. It makes every url starts with www.domain.com, ...


0

This location = / { proxy_pass http://SIPREPWWPRESS03.simosa.inet/; } Should be location / { proxy_pass http://SIPREPWWPRESS03.simosa.inet/; } As per http://wiki.nginx.org/HttpCoreModule#location location = / { # matches the query / only. [ configuration A ] } location / { # matches any query, since all queries begin with ...


0

Try CustomLog "|/usr/bin/logger -p local1.notice -t %f" common for the file path, or CustomLog "|/usr/bin/logger -p local1.notice -t %U" common for the URL. See Custom Log Formats in the Apache docs for a list of all the possible substitution strings.


3

Anyone have any ideas? Fix the problem, not the symptom. Stop using unencrypted FTP, it's highly insecure, and take other steps to secure your system. Blocking Adminer doesn't block any of the dozens of other similar systems (in PHP and otherwise), nor does it block someone from writing custom code that also alters the database. If they get your FTP ...


0

There is a default virtual host defined in your httpd.conf that will handle web requests on the IP address itself. It will appear first in the list of VirtualHost's and the ServerName tag is typically set to the server IP address rather than a domain name. Example: <VirtualHost 104.37.179.4:80> ServerName 104.37.179.4 DocumentRoot ...


-1

Add below line in custom.conf Header set X-Frame-Options "SAMEORIGIN" Bounce Apache server Retest the issue.


0

You likely have two OpenSSL installations on your CentOS server. Run the command ldd /usr/local/apache/modules/mod_ssl.so using the path to mod_ssl.so defined in your httpd.conf. This will return the libraries linked to mod_ssl.so. Are they using the same libraries as your system OpenSSL? My guess is that your Apache is configured to use a different ...


0

Do not set the timeout to 3000, you are just asking to crash a server let alone a under powered raspberry pi. Likely it might be max connections since it is a pi there is not enough threads on the processor to handle high to handle congruent requests. The pages load when I visit them. I think the reply on this thread is a valid explanation of the 408's ...


1

is HTTPS to HTTPS proxy a good idea? Depends on the situation/use-case/reasoning, there's no one-fits-all answer for that. if so, do I need to give the proxy the SSL certificate too or can I just enable SSL in nginx/apache/whatever's parameters? Yes and No! You have two ways of doing this: SSL Reverse Proxy TCP Load Balancing SSL Reverse ...


0

Authentication sequence and requirements still not clear to me, but other than that should be easy with apache. I have implemented a similar setup using cookies. You need to have 2 locations under the same domain (to allow access to the same cookies) - one protected , another not protected (used to display the login page and create a cookie upon successful ...


-1

Issue in pyinotify: https://github.com/fail2ban/fail2ban/issues/878 in /etc/fail2ban/jail.conf or /etc/fail2ban/jail.local I changed "backend = auto" to "backend = polling" and everything works as expected ;) service fail2ban stop service fail2ban start


1

The problem is that your Apache installation is unable to link the shared libraries of your new OpenSSL installation. Run the command ldd /usr/local/apache/modules/mod_ssl.so (with the apporpriate path to your mod_ssl.so). You'll see that mod_ssl.so is not linking to the libraries in /usr/local/ssl/lib You have a couple options to fix the problem: Option ...


1

Note that it's insufficient to verify that the certificate contains an SHA-2 signature. You need to check that none of the intermediate certificates in the chain up to the root are signed with SHA-1. NSS features an environment variable, NSS_HASH_ALG_SUPPORT, which can be used to control what hashing algorithms are available to progams using the library. ...


1

In eApache documentation they describe it clearly (in Apache 2.4 MaxClients is renamed to MaxRequestWorkers): The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served. Any connection attempts over the MaxRequestWorkers limit will normally be queued, up to a number based on the ListenBacklog directive. ...


1

From TFM: The MaxClients directive sets the limit on the number of simultaneous requests that will be served. Seems pretty clear to me.


0

on centos6 /etc/php.ini should be the place, make sure it is not defined multiple times in the file. By default, there is the description of tag in a "Quick Reference" section: ; short_open_tag ; Default Value: On ; Development Value: Off ; Production Value: Off don't add the tag there as it is set later on in a "Language Options" section (which ...


1

As you are using the prefork module and the server is just for testing you could change the values: seeing that you have 2GB of RAM I would put it a little smaller values: <IfModule mpm_prefork_module> StartServers 2 MinSpareServers 2 MaxSpareServers 4 MaxClients 16 MaxRequestsPerChild 50 ...


0

If you merely want to forcibly restart Apache if it hangs (for any reason) then you should install System Integrity Monitor by R-fx Networks. Among many features, it can be configured to monitor your web services, automatically issue restart commands and send out notifications. Quick install instructions: cd /usr/local/src wget ...


0

For local (without entry in global DNS) web, use HOSTS file entry to translate domain1.com and domain2.com to 192.168.1.9.


0

There are two problems to set up what you are looking for: unlike for http, reverse proxies for ftp are a pretty rare breed and those that exist (like the old Suse proxysuite) are - to remain polite - not really a joy to set up and work with. unlike http 1.1, ftp has no provisions for virtual hosting, meaning that a server cannot see the hostname you want ...


1

Apache reads your vhost files in alphanumeric order, and the first one it reads becomes the default vhost in case none of the ServerName or ServerAlias directives match. See Name-based Virtual Host Support in the Apache docs. So, for whatever domain you want to be "default", make sure that vhost file is listed first in the directory listing.


3

you need check up DocumentRoot settings, in the httpd mod alias doc, if you are creating an Alias to a directory outside of your DocumentRoot, need to explicitly permit access to the target directory Alias /image /ftp/pub/image <Directory /ftp/pub/image> Order allow,deny Allow from all </Directory>


0

You want to add the redirect to the existing *:443 vhost. Something like this should do it: RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] Put that before any other RewriteRule sections.


0

You Have to go to lower layer it only comes to my mind in the firewall chain having a validation check for the REQUEST HOST & what you have with Apache this will allow the package to be ignored or dropped


1

As @ikrabbe guesses, they are symlinked. # ls -las /etc/httpd total 16 4 drwxr-xr-x 4 root root 4096 Jun 19 12:43 . 4 drwxr-xr-x 50 root root 4096 Jun 19 12:43 .. 4 drwxr-xr-x 2 root root 4096 Jun 19 12:43 conf 4 drwxr-xr-x 2 root root 4096 Jun 19 12:43 conf.d 0 lrwxrwxrwx 1 root root 19 Jun 19 12:43 logs -> ../../var/log/httpd 0 lrwxrwxrwx 1 root ...


0

I've recently got this problem and after eliminating all other causes in this thread, I found that mod_php5 extension (in my system at /usr/lib64/apache2/mod_php5.so ) was without executing pemitions. After chmoding it it worked.


0

I do not think with apt-get you could give parameters so it would know which php.ini to use. I think you could either try to compile the module, or download the .deb file from the repo, and extract the contents with 'ar' first followed by extracting the data tar gzip. Then you could move the file over manually.


0

Thanks for all the input. I've solved this by adding a condition to the virtualhost section that exludes the redirect to 443 for the : RewriteCond %{REQUEST_URI} !^/proxy/login.php$


1

I'm just guessing: /etc/httpd/modules links to /usr/lib64/httpd/modules, so both are the same files.



Top 50 recent answers are included