I'm using apache webserver for implementing virtual hosts. I want support on using RedirectMatch in combination with regular expressions. I want to redirect an incoming url with specific information to redirect to a local file. I'm trying the next line:
RedirectMatch /sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet(.*(BSL01).*)http://10.103.140.62/BSL01_X_1197.json ( This gives no match !? )
The incoming url looks like: http://10.103.140.62:80/sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet?$filter=Gemeentecode%20eq%20%27BSL01%27%20and%20Sectie%20e q%20%27X%27%20and%20Perceelsnummer%20eq%20%2701197%27&$format=json and I want to check on the word BSL01
The Linux Server got down when the MaxClients 256 is reached. Error Log:
"server reached MaxClients setting, consider raising the MaxClients setting"
So that I have tried to increased the MaxClients Value to 500, after changed the value in httpd.conf and restart I get following error message.
" [notice] SIGHUP received. Attempting to restart WARNING: MaxClients of 500 exceeds ServerLimit value of 256 servers, lowering MaxClients to 256. To increase, please see the ServerLimit directive."
So that I tried changed the Server limit in /usr/local/apache/include/httpd.h header file. but it seems like there is no entry.
Apache Version : 2.2.8
So I have added the ServerLimit 500 entry in httpd.conf file and restart the httpd service. But still shows the same warning mesg. Please help me regarding this.
We have the Dedicated server for Flash Game Server with following configuration.
RHEL4 OS 2GB RAM Intel(R) Xeon(R) X3210 @ 2.13GHz Cpanel Installed. Apache 2.2.8 PHP 5.2.4 MySQL 4.1.2 (MySQL Server is working in differend server)
******************************************************* Acme:pork version v0.0.8 required--this is only version v0.0.7 at /var/cpanel/perl/easy/Cpanel/Easy/Utils/BackGround.pm line 14. BEGIN failed--compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/Utils/BackGround.pm line 14. Compilation failed in require at (eval 18) line 3. ...propagated at /usr/lib/perl5/5.8.8/base.pm line 85. at (eval 16) line 3 at /var/cpanel/perl/easy/Cpanel/Easy.pm line 15 BEGIN failed--compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy.pm line 15. Compilation failed in require at (eval 1) line 3. ...propagated at /usr/lib/perl5/5.8.8/base.pm line 85. BEGIN failed--compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/Apache.pm line 8. Compilation failed in require at /scripts/easyapache line 23. *******************************************************
Using Plesk 12.0.18 and CentOS 6.6, I installed PHP 5.6 through the Plesk Updates menu. After that, the new version was not automatically selectable inside Plesk Panel. I added it using php_handler.However, when selecting PHP 5.6 for a website, I only get a 500 server error.
Trying to troubleshoot, I ran "/opt/plesk/php/5.6/bin/php-cgi -v", which also resulted in an error:Fatal Error Unable to allocate shared memory segment of 67108864 bytes: mmap: Cannot allocate memory (12)The same kind of error is logged in the error_log for the website I switched to 5.6.
The error also occurs when calling "php-cgi -v" directly in the command line.The same error occured when I tried the same thing with PHP 5.5.
I have received notices from several customers with this error and I checked myself. When trying to connect to a ftp hosted on my server with Plesk gives an error expired certificate, a certificate of Parallels. The solution I've found is to configure access without TLS but says it is unsafe and customers are not satisfied.
my dedicated server is running using cPanel 11 apache 1.3.39 , php 5.2.4
i read a thread here in WHT says the " apache 2.2 with php 5.2.5 handle the load and doing high performance"
if it is true , plz anyone get the tutorials to upgrade it using /scripts/easyapache with GD libraries . and after upgrade will i have to re secure php again or what?
What will be best combo of those 3 which is main core for running almost any web server.Presently i have latest mysql,apache and php installed,but some people says how that is not good beacuse newest version arenot tested yet well enough.
I'm trying to add multiple PHP version (current version installed: 5.5.13), using the official documentation. I always get 500 Internal Server Error after switching to the new version, with the following error_log content:
Code: [Sat Jun 07 00:49:35 2014] [warn] [client XXX.XXX.XXX.XXX] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sat Jun 07 00:49:35 2014] [error] [client XXX.XXX.XXX.XXX] Premature end of script headers: index.php Here you can view phpinfo() obtained running php54-cgi index.php from the command line. Same script doesn't work as FastCGI.
I'm trying to add PHP 5.4.29. Here is how I compiled it:
Switching back to PHP 5.5.13 and the script works fine (a simple phpinfo() output).How can I try to understand/debug what's wrong with the installation?
Usually everything has been working fine with this .htaccess-file until today. There hasn't been any change on the system.
If you click on the hyperlink to the restricted area the login window appears where you need to type in your username and a password. After typing in these data the following message appears in the browser:
500 Internal Server Error
The server encountered an internal error or misconfigruation and was unable to complete your request. (…)
The apache error log file contains the following message:
Request exceeded the limit of 10 sub request nesting levels due to probable configuration error.
Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
The increase of the LimitInternalRecursion does not solve the problem. So I switched the LogLevel in the httpd.conf file from warn to debug and looked again on the entries of the error log.
The following appeared (I have replaced ip addresses, usernames and URL by xyz or <URL>) :
Code:
[error] [client xyz] mod_digest_apple: Client is using a nonce not issued by this server for this context:/rb/Vorlesung/WS12/Downloads/, referer: http:<URL>
I have recently upgraded mysql server from 5.0.75 to 5.1.31 on my Ubuntu server 9.04 32 bit. After that when I am running phpmyadmin it is printing a warning :
Your PHP MySQL library version 5.0.75 differs from your MySQL server version 5.1.31.
loading a phpinfo() shows that the mysql variable "Client API version" on my server doesn't match the version of mysql installed ( 4.0.20 when mysql version is 4.1.21).
Can this cause trouble and php or mysql errors on scripts i'm running?
How can I analyze apache error log on linux server ? I need to analyze it on the server because some issue caused that its size for today is 1.2GB!! and it's impossible to go over it line by line.
since i take server i got a lot of errors on my apche logs when i post this command on my shell:-
Code: tail -f /usr/local/apache/logs/error_log will coming a lot & fast error and not stop until i stop the apache:-
Code: [Fri May 29 11:37:52 2009] [error] [client 77.167.228.165] File does not exist: /usr/local/apache/htdocs/40E80014354C4C30365047322020202020202020202020206C0000004D6600000001760000005CEB000530E1E8EEF4 [Fri May 29 11:37:52 2009] [error] [client 89.215.36.123] File does not exist: /usr/local/apache/htdocs/40E80014202020202020465032443031324B3842364842456C000000446600000001760000005CEB000530797F848A [Fri May 29 11:37:52 2009] [error] [client 93.185.179.132] File does not exist: /usr/local/apache/htdocs/40E800006C000001596600000001760000005CEB0005307587A8B4
every thing is ok but i need to remove this error and i can't under stand from where comming ! "/usr/local/apache/htdocs"
I've been having some trouble with Apache 2.0 recently. Whenever I load somewhere between 200 and 230 virtual hosts into Apache's config (as per my hosting control panel), Apache will fail to restart when the command "apache2ctl restart" is run. The command "/etc/init.d/apache2 restart" fails as well. All it does is signal all child processes of Apache to be terminated and fail to start again.
Here's what the log has to say:
Code: [Tue Nov 13 19:04:18 2007] [notice] SIGHUP received. Attempting to restart [Tue Nov 13 19:04:18 2007] [notice] seg fault or similar nasty error detected in the parent process Is it that Apache is too bloated with vhosts to restart or is it something else?
I'm having a serious problem with Apache 2.0.54. I'm running Debian Sarge (3.1) and I cannot upgrade Apache (easily) so I am stuck using 2.0.54 (2.2+ are not supported on Sarge). I have been trying everything with config changes and different tweaks but Apache is giving me lots of trouble. Whenever I run "apache2ctl restart" Apache will crash and will not start. But when I run "apache2ctl start" Apache will run and in the log, it simply puts "[warn] pid file /var/run/apache2.pid overwritten -- Unclean shutdown of previous Apache run?". I get nothing else before or after I run those commands. Running "apache2ctl graceful" starts messing with it giving me "apache2 <defunct>" errors and "apache2ctl configtest" gives me nothing except "Syntax OK."
Here is my "apache2.conf" file:
Code: # Based upon the NCSA server configuration files originally by Rob McCool. # Changed extensively for the Debian package by Daniel Stone <daniel@sfarc.net> # and also by Thom May <thom@debian.org>.
# ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation # (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>); # you will save yourself a lot of trouble.
ServerRoot "/etc/apache2"
# The LockFile directive sets the path to the lockfile used when Apache # is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or # USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at # its default value. The main reason for changing it is if the logs # directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL # DISK. The PID of the main server process is automatically appended to # the filename.
LockFile /var/lock/apache2/accept.lock
# PidFile: The file in which the server should record its process # identification number when it starts.
PidFile /var/run/apache2.pid
# Timeout: The number of seconds before receives and sends time out.
Timeout 300
# KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate.
KeepAlive On
# MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance.
MaxKeepAliveRequests 100
# KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection.
# prefork MPM # StartServers ......... number of server processes to start # MinSpareServers ...... minimum number of server processes which are kept spare # MaxSpareServers ...... maximum number of server processes which are kept spare # MaxClients ........... maximum number of server processes allowed to start # MaxRequestsPerChild .. maximum number of requests a server process serves <IfModule prefork.c> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule>
# pthread MPM # StartServers ......... initial number of server processes to start # MaxClients ........... maximum number of server processes allowed to start # MinSpareThreads ...... minimum number of worker threads which are kept spare # MaxSpareThreads ...... maximum number of worker threads which are kept spare # ThreadsPerChild ...... constant number of worker threads in each server process # MaxRequestsPerChild .. maximum number of requests a server process serves <IfModule worker.c> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule>
# perchild MPM # NumServers ........... constant number of server processes # StartThreads ......... initial number of worker threads in each server process # MinSpareThreads ...... minimum number of worker threads which are kept spare # MaxSpareThreads ...... maximum number of worker threads which are kept spare # MaxThreadsPerChild ... maximum number of worker threads in each server process # MaxRequestsPerChild .. maximum number of connections per server process (then it dies) <IfModule perchild.c> NumServers 5 StartThreads 5 MinSpareThreads 5 MaxSpareThreads 10 MaxThreadsPerChild 20 MaxRequestsPerChild 0 AcceptMutex fcntl </IfModule>
User www-data Group www-data
# The following directives define some format nicknames for use with # a CustomLog directive (see below). LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined LogFormat "%h %l %u %t "%r" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent
# Global error log. ErrorLog /var/log/apache2/error.log
# Include module configuration: Include /etc/apache2/mods-enabled/*.load Include /etc/apache2/mods-enabled/*.conf
# Include all the user configurations: Include /etc/apache2/httpd.conf
# Include ports listing Include /etc/apache2/ports.conf
# Include generic snippets of statements Include /etc/apache2/conf.d/[^.#]*
#Let's have some Icons, shall we? Alias /icons/ "/usr/share/apache2/icons/" <Directory "/usr/share/apache2/icons"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory>
# Set up the default error docs. # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html #
# # Putting this all together, we can Internationalize error responses. # # We use Alias to redirect any /error/HTTP_<error>.html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages' appearance without changing any of the # default HTTP_<error>.html.var files by adding the line; # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /usr/local/apache2/error/include/ files and # copying them to /your/include/path/, even on a per-VirtualHost basis. #
<IfModule mod_negotiation.c> <IfModule mod_include.c> Alias /error/ "/usr/share/apache2/error/"
<Directory "/usr/share/apache2/error"> AllowOverride None Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Order allow,deny Allow from all LanguagePriority en es de fr ForceLanguagePriority Prefer Fallback </Directory>
# # The following directive disables redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with Microsoft WebFolders which does not appropriately handle # redirects for folders with DAV methods. #
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^gnome-vfs" redirect-carefully BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
# Allow server status reports, with the URL of http://servername/server-status # Change the ".your_domain.com" to match your domain to enable. # #<Location /server-status> # SetHandler server-status # Order deny,allow # Deny from all # Allow from .your_domain.com #</Location>
# Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".your_domain.com" to match your domain to enable. # #<Location /server-info> # SetHandler server-info # Order deny,allow # Deny from all # Allow from .your_domain.com #</Location>
# Include the virtual host configurations: Include /etc/apache2/sites-available/[^.#]* And here's my "httpd.conf" file:
Code: # This is here for backwards compatability reasons and to support # installing 3rd party modules directly via apxs2, rather than # through the /etc/apache2/mods-{available,enabled} mechanism. # #LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so <VirtualHost 66.150.225.201:80>
# httpd dmn entry cgi support BEGIN. # httpd dmn entry cgi support END.
# httpd dmn entry PHP2 support BEGIN. php_admin_value open_basedir "/var/www/:/usr/share/php/:/tmp/" # httpd dmn entry PHP2 support END.
<Directory /var/www> # httpd dmn entry PHP support BEGIN. # httpd dmn entry PHP support END. Options Indexes Includes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory>
</VirtualHost>
I am on the end of my rope with Apache and feel like just formatting the server and reinstalling Apache. Which reminds me, I did try using apt-get to remove and install Apache again but nothing worked.
Today I check few of my websites folder under my web server I found that most of the folders contains the file "error_log" at some folders it is in smaller size but in others its around 600-900 MB in size per file. My question is
1. Whether its wise to stop creation of that file by Apache? If yes then how to stop it?
2. Second question is can we stop it for only few websites?
3. And is that safe to delete error_log file? If yes how to search that file in SSH and how to delete it using one command as it would be really hard to delete one by one from each folder.
the above commands will first find all files and list them, the next one will find all files and remove them, the last will confirm that all the error log files have been deleted.