I have been helping a friend setup a dedicated server to host his clients sites on and wanted to make things as streamlined and as easy as possible. To do so I installed Apache 2.2, PHP5, XCache and mod_fcgid. I am using suexec with Apache to run the scripts as the users who own the scripts.
I wanted to verify that XCache was working, so I copied the XCache admin directory into one of the document roots and tried to login. To my surprise I was not able to login even though I was using a known good md5 password hash in the XCache configuration.
It took me about a month of searching to find out that the server variables PHP_AUTH_USER and PHP_AUTH_PW don’t seem to work with mod_fcgid. This Lighttpd forum entry led me to the XCache admin config.php.
Here is what is required:
- Create a file in your XCache admin directory called config.php
In this file add the following, using the information you provided in the XCache configuration:
$_SERVER[‘PHP_AUTH_USER’] = ‘admin_username’;
$_SERVER[‘PHP_AUTH_PW’] = ‘admin_password’;
Configure some other means of authentication such as htpasswd or htdigest
I’ll be attending the LinuxWorld Expo in San Francisco at the beginning of August. I’ll be arriving mid way through the conference so that I can attend to my sons first birthday and celebrations.
I’ll be attending the exhibit hall and keynote addresses on Wednesday and Thursday (Aug 6 + 7), as well as Ubucon and flying back out on Friday. To those reading this who will be out there for the conference, maybe we will run into each other.
Over the years I have been installing Lighttpd from the RPMforge repository on my CentOS 4 servers for high traffic sites. The one thing that bothers me time and again is that installing lighttpd, lighttpd-fastcgi and PHP; configuring lighttpd.conf to enable FastCGI and configuring FastCGI for PHP isn’t all that is required. Try doing only that and starting Lighttpd. It will die immediately all the while telling you that it started successfully.
The problem is that the default configuration for FastCGI + PHP in lighttpd.conf tries to place the PHP sockets into /var/run/lighttpd/ which doesn’t exist.
Only 2 quick steps are required to finish the installation and configuration:
chown lighttpd. /var/run/lighttpd
Now fire up Lighttpd and enjoy the wonderful world of PHP on a web server that doesn’t suck.
Side Note: For those of you who are trying to find the location of php-cgi on your PHP 4.3.9 install from the base or updates CentOS repo, you aren’t going to find what you are looking for. Uninstall PHP 4.3.9 and install PHP 5.1.6 from the centosplus repo.
This morning at GMT 03:39:23 a user from the future accessed a website running on one of the servers that I manage at work.
There was a date timestamp in the HTTP request of “Wed, 34 Apr 3119 26:46:54 GMT”.
Not only does this prove that users from the future are browsing our sites but it also proves that some time in the future we will add extra days into the calendar and add extra hours into the day.
Apparently time travel is possible. Bravo Doc Brown.
I have a feeling that Apple is behind this. While there are numerous requests during that time period, one of those hits came from a browser using the Webkit rendering engine. And Apple has created a piece of software called “Time Machine”. I think that the “Time Machine” software and the Webkit rendering engine are running a Delorean. Now to find out where they got their “Flux Capacitor” from. And plutonium…Damn these guys at Apple are serious.
Since launching FreeMyFeed on April 14th the service has really begun to gain momentum.
On April 17th Free My Feed was featured on http://googlesystem.blogspot.com/ and subsequently on Lifehacker.
Since all of the publicity beginning on April 17th from the aforementioned sites as well as many others, FreeMyFeed has been used to free over 800 feeds and has served up these feeds over 7000 times.
For some time now I have been using application based feed readers due to the lack of the ability to subscribe to authenticated feeds or to feeds that required the use of an invalid SSL certificate using a web based feed reader such as Google Reader. This has recently become really annoying as I have to use a different application based feed reader in Windows, Linux and Mac requiring me need to learn 3 different applications each of which act quite differently.
I was recently talking to a co-worker telling him that our developers would need to subscribe to our Trac RSS feed using an application based feed reader because web feed readers would not support authentication. His response was “yeah, they won’t work. the desktop ones/ff extensions suck.”
I made a decision later that day to determine a way to work around this. The solution actually came to me right away. Create a RSS proxy service where a user supplies a RSS URL, username, and password. From this information generate an alternate URL for the users use. When the user requests this alternate URL parse the URI to retrieve the original URL, username and password, then retrieve the feed on the fly and echo it back to the user.
As my co-worker stated on his web site, “It’s a crazy simple service and in hindsight I’m shocked that no one’s built such a thing before (to the best of my knowledge) - myself included.”
As I made the decision to not store any user data on my server due to security and privacy, I went with a solution that actually places the username and password in the URI. For those of you who may be concerned with this, please take comfort in knowing that the original URL, username and password are encoded in the new URI and the password is encrypted using a rotating cipher.
Without further adieu, I would like to introduce Free My Feed.
I recently wrote a script that waits for something to happen and then executes a command on a remote machine via ssh. I ran into a problem where the ssh connection was established and then the ssh connection would never close.
I found out after some diagnostics that becuase there was no tty assigned to the local session that a tty was not being assigned on the remote session and for some reason ssh was not disconnecting after the command had finished.
The solution was to run the ssh command with the -t flag as such:
ssh -t -t firstname.lastname@example.org "somecommand"
The -t is used to force pseudo-tty allocation but when there is no local tty you must use -t -t to force tty allocation on the remote server.
I have seen a good number of incoming links requesting this page that I had written back when I was using a wiki for my web site. So I decided to bring it back and make some redirects to direct people to the correct location.
With that being said these instructions are for configuring Fedora (Core 5 was used at the time) to use a Sprint PCS Connection Card to connect to the internet. I cannot verify or test this functionality as I no longer have a Sprint PCS Connection Card. So let the fun begin.
- With the Sprint PCS Connection Card PC-5740 not inserted boot up the computer into Fedora Core 5.
- Open a terminal window and SU to root.
- Execute the following command:
tail -f /var/log/messages
- Insert the card.
- You should see something similar to the following:
Aug 15 13:01:24 fedora-mobile kernel: pccard: CardBus card inserted into slot 0
Aug 15 13:01:24 fedora-mobile kernel: PCI: Enabling device 0000:03:00.0 (0000 -> 0002)
Aug 15 13:01:24 fedora-mobile kernel: ACPI: PCI Interrupt 0000:03:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
Aug 15 13:01:24 fedora-mobile kernel: ohci_hcd 0000:03:00.0: OHCI Host Controller
Aug 15 13:01:24 fedora-mobile kernel: ohci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 5
Aug 15 13:01:24 fedora-mobile kernel: ohci_hcd 0000:03:00.0: irq 11, io mem 0xc2000000
Aug 15 13:01:24 fedora-mobile kernel: usb usb5: configuration #1 chosen from 1 choice
Aug 15 13:01:24 fedora-mobile kernel: hub 5-0:1.0: USB hub found
Aug 15 13:01:24 fedora-mobile kernel: hub 5-0:1.0: 1 port detected
Aug 15 13:01:24 fedora-mobile kernel: PCI: Enabling device 0000:03:00.1 (0000 -> 0002)
Aug 15 13:01:24 fedora-mobile kernel: ACPI: PCI Interrupt 0000:03:00.1[B] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
Aug 15 13:01:24 fedora-mobile kernel: ohci_hcd 0000:03:00.1: OHCI Host Controller
Aug 15 13:01:24 fedora-mobile kernel: ohci_hcd 0000:03:00.1: new USB bus registered, assigned bus number 6
Aug 15 13:01:24 fedora-mobile kernel: ohci_hcd 0000:03:00.1: irq 11, io mem 0xc2001000
Aug 15 13:01:24 fedora-mobile kernel: usb usb6: configuration #1 chosen from 1 choice
Aug 15 13:01:24 fedora-mobile kernel: hub 6-0:1.0: USB hub found
Aug 15 13:01:24 fedora-mobile kernel: hub 6-0:1.0: 1 port detected
Aug 15 13:01:25 fedora-mobile kernel: ohci_hcd 0000:03:00.0: wakeup
Aug 15 13:01:26 fedora-mobile kernel: usb 5-1: new full speed USB device using ohci_hcd and address 2
Aug 15 13:01:26 fedora-mobile kernel: usb 5-1: configuration #1 chosen from 1 choice
Aug 15 13:01:26 fedora-mobile kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device
Aug 15 13:01:26 fedora-mobile kernel: usbcore: registered new driver cdc_acm
Aug 15 13:01:26 fedora-mobile kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
- The above is all important but the line we are most interested in is the following:
Aug 15 13:01:26 fedora-mobile kernel: cdc_acm 5-1:1.0: ttyACM0: USB ACM device
- The above line shows us that the device created is ttyACM0 which is actually located at /dev/ttyACM0.
- Assuming you are running Gnome, download and install gnome-ppp with the following:
yum install -y gnome-ppp
- In order for gnome-ppp to work properly it must be run as root.
- Open a terminal window and su to root.
- Execute gnome-ppp (Tip: You can add a “ &” to the end of gnome-ppp to disconnect it from the active session allowing you to close the terminal window without closing gnome-ppp).
- Click the “Setup” button.
- Click the “Detect” button. Your modem (/dev/ttyACM0) should automatically be detected. If not then something above went wrong.
- Click the “Init Strings…” button and change “Init 2” to “ATZ” (without the quotes).
- For the username you will need to boot into Windows, open the PCS connection application and select Diagnositcs from the menu. Your username will be in the form of email@example.com.
- With gnome-ppp you are required to enter a password. This will not affect the dial up seeing as though the Sprint servers wont even respond to the password being sent. So type whatever you want in this field.
- The phone number is “#777”.
- Click connect. You’re done.
- If you can’t access anything on the internet after connecting and you have IP address info, it is probably due to gnome-ppp not updating the nameserver statements in resolv.conf
Using gnome-ppp eventually got old for me so I wrote a bash script to take care of it. I won’t post extensive usage information on how to use it so use at your own risk (although I don’t see any actual risk involved).
You will need to do several things to get this up.
- Download sprint-dial.sh to your home dir or where ever you want.
- Download or configure your own .wvdial.conf and place it in your home dir and /root
- Execute the script
It has been quite some time since I have posted anything…Not due to the fact that I don’t have anything to post but rather because I am busy preparing for my soon to come son and have been quite busy with work. With that being said I have placed a “what is my ip” page on my site. It’s nothing special, but that is what makes it special. In my case I hate using the other “what is my ip” sites because they have so much extra crap on the page that I don’t care about like ads (Odd that I hate ads and I work for the largest internet advertising company).
With the being said…the url: http://sivel.net/ip
By the way…more postings to come soon!