Kurinchi Blogger Scribbles …


Posts Tagged ‘Apache’

Nov 15
2012

How to setup Apache Tomcat, Java on CentOS?

Last updated: November 13th, 2012

Below set of steps involve setting up Tomcat 6 on CentOS 5 with Java 1.6

Download Apache Tomcat

$ wget http://apache.parentingamerica.com/tomcat/tomcat-6/v6.0.36/bin/apache-tomcat-6.0.36.tar.gz

Go to opt/ folder and extract Tomcat

$ cd /opt

$ tar -xzf apache-tomcat-6.0.36.tar.gz

Create a tomcat user

$ useradd -d /opt/apache-tomcat-6.0.36/ tomcatuser

Change user permission on tomcat folder

$ chown -R tomcatuser:tomcatuser apache-tomcat-6.0.36
(more…)

Oct 02
2012

How to setup Rails on WAMP server using HTTP Proxy module?

Last updated: October 3rd, 2012

To setup Rails on windows after Ruby and Rails setup,

i) Edit hosts file in windows environment and set the server name in the hosts file to

127.0.0.1 myrails

In this example, i have used “myrails” as the server name for the project.

ii) Edit httpd configuration setting on WAMP to make sure proxy and proxy_http module is turned on (check if it those lines are not commented out)

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

(more…)

Sep 11
2012

Apache: How to deny access to a folder or file?

Last updated: September 8th, 2012

Add the following list of lines into .htaccess file or to vhost configuration file appropriate to the folder within the website

<Directory /securedata>
Order Deny,Allow
Deny from all
</Directory>

Same will be the case for denying files within directories

<Files ~ “\.ini$”>
Order allow,deny
Deny from all
</Files>

The above lines of code will be helpful for us to prevent .svn files, .ini files, .htaccess files, include files from display within Apache

Aug 15
2012

How to configure Zend Framework on an Apache server in a PLESK environment?

Last updated: August 15th, 2012

First, download the Zend framework and unzip the file contents to a location. At the time of the writing ZendFramework-1.11.12 was in use and we have used that version in this example. Key content of the download is the /library folder which has Zend libraries in it.

Then, go to the “conf” folder that was created when the site was created.

Inside the conf folder, create a new file and name it vhost.conf

Add the below contents to vhost.conf and save it. (more…)

Jun 25
2011

Apache: [warn] NameVirtualHost *:80 has no VirtualHosts

Last updated: June 25th, 2011

$ /etc/init.d/apache2 restart

After configuring Apache server settings on the name server, you may encounter a message “[warn] NameVirtualHost 192.168.1.3:80 has no VirtualHosts

The issue may be due to more than one entry of NameVirtualHost lines in the configuration settings. You can find this out by

$ grep NameVirtual * -R
site1:NameVirtualHost *:80
site2:NameVirtualHost *:80

Linux Solution: Remove one of the occurance of the NameVirtualHost and the warning message that you receive will vanish.

Aug 02
2010

PHP: ‘Fatal error: Allowed memory size of 8388608 bytes exhausted’

Last updated: December 30th, 2010

Reason why you see this message is due to PHP memory leakage. PHP is trying to load a large image or file into memory and is not finding enough space for it to load.

If you think, that you will need the necessary feature to upload large files then there are two ways by which you can enable this feature.

i) Edit the physical file and have the line
ini_set(“memory_limit”,”20M”);

ii) Edit php.ini and add the following line. You need to restart the apache/IIS server once php.ini file is modified.
memory_limit=32M

Feb 10
2010

Ubuntu: Where to find Apache Error log?

Last updated: February 10th, 2010

Location where the Apache error log entries can be found in Ubuntu

user@server:~# less /var/log/apache2/error.log

Sep 01
2009

cakephp Deprecated: PHP 5.3 Wamp

Last updated: September 2nd, 2009

Error message
cakephp Deprecated: Assigning the return value of new by reference is deprecated
You will see the above error message when you try to configure cakePHP framework using a Wamp Server installation and set the debug parameter as in

Configure::write(‘debug’, 2);

Cause: CakePHP is not PHP 5.3 ready unlike the latest version of Zend framework.

Remedy: Try downloading older version of PHP – e.g. PHP 5.2.9

Aug 30
2009

Apache Error Log

Last updated: September 3rd, 2009

Apache Error Log Expected “</File> but saw </Files>”

Check the error log file (in ubuntu it is in /var/log/apache2/error.log) for the above stated error message. Check the .htaccess file or the apache configuration files where you have restricted file permission using File Directive.

Aug 04
2009

Ubuntu, Apache: Virtual Hosting

Last updated: August 4th, 2009

Virtual Hosting in Ubuntu Hardy Heron: Case Example

Consider the case of two domain names mysite1 and site2 to be served on IP Address 192.168.1.100 (port 80)

Before proceeding let us look at how resolv.conf and hosts file are set up …

$ cat /etc/resolv.conf
search kurinchilion.com
nameserver 192.168.1.100

$ cat /etc/hosts
127.0.0.1 localhost
192.168.1.100 myserver.kurinchilion.com myserver

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

(more…)


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict