Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Dec 13, 2013

How to Fix error 'Could not determine the server's fully qualified domain name, using 127.0.0.1 '

Problem:

[root@spa ~]# service httpd start
Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for S erverName
                                                           [  OK  ]
[root@spa ~]#

solution:

Edit /etc/httpd/conf/httpd.conf
and search for ServerName and add
ServerName localhost

how to add files under apache server

In Apache server, add your contents under a directory and create symlink to it under /var/www/html/

or

move your directory under /var/www/html/

Nov 10, 2009

Characters of HTML file served by Apache are showing wrongly

Problem
Characters of  HTML file served by Apache are showing wrongly. Some characters like spaces or characters  are shown like symbols.

Solution:
Change character set of  apache by editing httpd.conf file 
edit  /etc/httpd/conf/httpd.conf and  change the value for the variable AddDefaultCharset
ex :-
AddDefaultCharset en_US.iso88591

Restart apache after editing httpd.conf. (To restart apache run "service httpd restart")



Similarly
Default character set of a system will be defined in a system variable called "LANG"
check your system's  value with
"echo $LANG"
change it according to your requirement
example-
 export LANG=en_US.iso88591


To see the list of possible character set in your system run
$> localedef --list-archive 
 

To name a few ,
en_US.iso88591
en_US.iso885915
en_GB.iso88591
en_GB.iso885915