Category Apache

How to find PHP.ini location

One day I was working on a new Drupal site for client. This was on a new server and I had no clue where anything was. I needed to find out what PHP version was running. I could not find this in Plesk for some reason. On Geeklog they had an article with a cool way to track down your PHP version and other information about PHP on a server.

 

You simply drop this single line “<?pOn hp phpinfo(); ?>” in a .php file.

Call it something like getphpinfo.php. Place it on the web-server and pull it up in a browser.

The URL you pull up should be: http://www.MYWEBSITE.com/getphpinfo.php

 

It will give you an output that looks like this:

 

 

 

Geeklog_Link

Read More

Setup a catch all domain

I needed to setup a catch all for one of my clients domains. This is what I needed to happen:

If user typed in an incorrect sub domain for mydomain.com that did not exist I needed it
to redirect them to www.mydomain.com. 

For example: if they type in notreal.mydomain.com it will send the user
to www.mydomain.com.

Here is what I did to accomplish this: 


Step 1: Added an A record to the mydomain.com domain zone of *.mydomain.com and had it point it to SERVERIPADDRESS.


Step 2: Add ServerAlias www.mydomain.com *.mydomain.com  to the httpd.conf file located in/usr/local/apache/conf/
Read More