Skip to main content

Posts

How to export a variable to a fastCGI application in Apache

I am using Apache on Linux(RHEL5) and Apache version is 2.2.4. I am running a fastCGI application using Apache and I want to export a variable to this application. I have already tried SetEnv directive in the httpd.conf file but it doesn't seem to work, Following is in the httpd.conf SetEnv MALLOC_CHECK_=3 I have also tried to set it using envvars file but still it's not exported in the application. Following is in the bin/envvars file export MALLOC_CHECK_=3 I would like to mention that I also have the following in my httpd.conf file # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User http Group http and I guess that's why it's not being exported in the application i.e Apache is being initially run as root and ...

Plesk file permissions - Apache/PHP conflicting with user accounts

I'm building a Drupal site which performs various automatic disk operations using the apache user (id=40). The problem is that the site was set up on a subdomain belonging to user ID 10001 (ie my main FTP account) so the filesystem belongs to that user ID. So I keep getting errors like this: warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/domain.com/httpdocs/sites/default/files/images/user owned by uid 48 in /var/www/vhosts/domain.com/httpdocs/includes/file.inc on line 579. I've tried changing the apache group in httpd.conf to apache:psacln, psacln being the default group for all web users but that's not helped. The situation now is: ..../files/images/ = 777 and chown = ftplogin:psacln ..../files/images/user = 775 and chown = apache:psacln ..../files/tmp = 777 and chown = ftplogin:psacln So apparently uid 40 and 10001 both have permissions to write to any o...

Assign all of an IPV6 subnet to localhost

I have a subnet like 2001:face:feed:beef::/64. I want to assign all of them to my server, without manually assign every address like 2001:face:feed:beef::[123456789abcdef]... In ipv4, we may use DNAT to do this, but it doesn't have NAT concept in ipv6, so I want to know if this is workable and does it have some workarounds.

Trying Apache 2 with SSL, I'm getting an "Invalid command '-----BEGIN', on my .CRT

I went through this tutorial http://www.vanemery.com/Linux/Apache/apache-SSL.html setting up my SSL on Apache2. But when I attempt to start my server I get this error: Syntax error on line 1 of /etc/apache2/conf.d/ssl.crt/foo-server.crt: Invalid command '-----BEGIN', perhaps misspelled or defined by a module not included in the server configuration What does it seem like I'm missing in my Apache setup? How can I check? Aay help is greatly appreciated! =-=-=-=-=-=-=-=-=-=-=-=-=-=-= below is my vhost file: ServerName foo.ca ServerAlias www.foo.ca RailsEnv development DocumentRoot /home/dan/rails/foo/public SSLEngine On SSLCipherSuite HIGH:MEDIUM SSLProtocol all -SSLv2 SSLCertificateFile /etc/apache2/conf.d/ssl.crt/foo-server.crt SSLCertificateKeyFile /etc/apache2/conf.d/ssl.key/foo-server.key SSLCertificateChainFile /etc/apache2/conf.d/ssl.crt/foo-ca.crt SSLCertificateFile /etc/apache2/conf.d/ssl.crt/foo-ca.crt ...

domain name system - How to setup a local DNS for dev site using bind?

I'm going to start this off with a quick, yes this is similar to many other questions, but I have a very specific question related to how to configure bind9 which doesn't seem to have been covered else where. This is my situation: We have a bunch of dev machines behind a firewall. The dev machines have no external access. All programmers are on a vpn that gives them access to the dev machines. I'd like to have a way to allow multiple 'dev' DNS records, without messing around with our public DNS records. Broadly speaking this is my plan: Run a DNS server on the dev network Have all programmers have a pair of DNS servers defined on their local network configs So it'd work like this; I have a bunch of dev dns entries, eg. *.dev.mysite1.com -> vpn ip *.dev.mysite2.com -> vpn ip However, since the client machines have two DNS entries defined, they will chain the request and requests for www.mysite1.com, etc. will resolve to the normal (public) dns server. So, q...

ubuntu - Permission denied error in cron jobs log

I am running an Ubuntu EC2 instance as an "ubuntu" user.When I create a cron job for checking the mysql status saving the logs in /var/log/filename.log,I receive a mail(via installed postfix) and the log states: "cannot create /var/log/filename.log:permission denied".When the cron job is created to save logs in /home/ubuntu/filename.log and the ownership has been changed for the /var/log/filename.log, no mails were received. My path variable: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games What is the best way to see my cron job's message?

untagged - What a beginner should know/learn for sysadmin job?

This is a Canonical Question about System Administration Careers When I start my job as System Administrator, what basics skills should I know/learn? Are there any key differences for Network, Storage, Database, and other Administrators? Answer There is a lot of overlap with existing questions, I am creating a wiki here with links. Please feel free to update. How to make (and restore) backups! Customer service skills Troubleshooting How to respond when there is a crisis The OSI Model, and IP networking. How to document their network How to ask for help in a way that will get you useful results. Security How to use the CLI How to monitor the systems you will be responsible for Also see

infrastructure - What to look for in a server rack?

I'm looking to purchase a rack/enclosure for some servers. As this is my first time shopping for this type of equipment, I need to know what to look for. I'm asking not only about how to buy the rack, but also what accessories will I need? What can I do without? What should I look for in terms of delivery and assembly? What do I need to prepare for in terms of power? Cooling inside the cabinet? Anything else I might be overlooking? I'll share some back story in case anyone finds it helpful, but really generic answers for anyone who is shopping for rack equipment is helpful. Where I'm at we used to have mainly tower servers... even a number of glorified desktops that lived in our server room. We do have a couple two-poster racks for switches, but everything sits in a wooden bench made of 2x4's and plywood that's been here much longer than I have. Over the last three years I've been able to virtualize the desktop "servers" and as items have c...

mod proxy - Apache - test is SetEnv variable being loaded

Is there any way I can actually tell if a SetEnv variable is being loaded by Apache? I am trying to set: SetEnv proxy-sendchunked 1 However have no way in telling if it is actually being set. Is there any logging that can be enabled to show it is being picked up? Answer Environment variables can be logged in the access log using the LogFormat option %e. Put "%{VAR}e" as an additional argument to LogFormat directive in your configuration file. Then in access log, value of VAR will be placed in each log.