Kurinchi Blogger Scribbles …


Posts Tagged ‘Apache’

Jul 23
2015

Django: Permission denied access to / because search permissions are missing on a component of the path

Last updated: July 23rd, 2015

Possible reasons and solutions

i) SELinux settings enforcing a file serve

$ /etc/selinux/config

Change SELINUX = disabled within the file and check if this is the cause for the error

ii) Application directory under restricted user permission folder path

For example, configuring the django project inside /root folder and trying to serve those files via apache server (apache user).

Try changing the folder to a path that you think is good for allowing public access such /var/www or /opt/sites .
(more…)

Jul 20
2015

Apache webserver (httpd) service installation on CentOS 7 Linux

Last updated: July 22nd, 2015

First set up the httpd (web) service

$ yum install httpd

If httpd service is already installed, update the service

$ yum update httpd

Now, start the web server

$ service httpd start

Redirecting to /bin/systemctl start httpd.service

Check the status of the web server

$ service httpd status

(more…)

Jun 03
2015

How to set apache server error status codes for beginners

Last updated: July 23rd, 2015

Edit Apache configuration file for your site setting. It may be httpd.conf or a virtual host file that ends with .conf specific to your site.

Add the below line with the host file and give the correct path for the error message page.

ErrorDocument 404 /404.html

If you do not want to create a custom page to showcase the error message, you can simply add the error message in the configuration file

ErrorDocument 404 “404 – Page not found.

Error status codes on the client side

400 – Bad Request
401 – Unauthorized
402 – Payment Required
403 – Forbidden
404 – Not Found
405 – Method Not Allowed
406 – Not Acceptable
407 – Proxy Authentication Required
408 – Request Timeout
409 – Conflict
410 – Gone
411 – Length Required
412 – Precondition Failed
413 – Request Entity Too Large
414 – Request-URI Too Long
415 – Unsupported Media Type
416 – Requested Range Not Satisfiable
417 – Expectation Failed

Error status codes shown from server

500 – Internal Server Error
501 – Not Implemented
502 – Bad Gateway
503 – Service Unavailable
504 – Gateway Timeout
505 – HTTP Version Not Supported

Jul 22
2014

PHP Fatal error: Class ‘DOMDocument’ not found

Last updated: July 22nd, 2014

When setting up applications such as Magento you may come across the error message “PHP Fatal error: Class ‘DOMDocument’ not found …” in your apache server log files

Reason for the error is missing log files. Issue the commands below to fix the issue

$ yum -y install php-xml php-devel

$ service httpd reload

Jul 09
2013

How to setup, install Apache, PHP and MySQL on Mac OS?

Last updated: July 9th, 2013

Apache server is installed by default on Mac. Access the configuration settings for Apache by going to

$ cd /etc/apache2/
$ vi httpd.conf

To enable php, edit httpd.conf and uncomment the line
#LoadModule php5_module libexec/apache2/libphp5.so

Uncomment other lines that you may want to load in your system. As you are enabling PHP in your system, you may want to change the DirectoryIndex to
DirectoryIndex index.php index.html

Default group/user settings inside Apache on Mac is _www:_www
(more…)

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.


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict