LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apache2ctl start <--- error (https://www.linuxquestions.org/questions/linux-software-2/apache2ctl-start-error-189270/)

mrosati 06-03-2004 10:49 AM

apache2ctl start <--- error
 
hi.
i have downloaded apache with gentoo emerge, when i start it i get this error:

bash-2.05b# apache2ctl start
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

what could be the problem?

thanks matteo

skunkburner 06-03-2004 10:57 AM

What you need to do is find your apache.conf file and uncomment or add the line (use the command (as root) 'find / -name httpd.conf 2>/dev/null' )

ServerName 'insert your server name here'

so if your server is called bob, it would read

ServerName bob

mrosati 06-03-2004 11:51 AM

ok i have done it and i have also set my hostname:

-------------------------------------------------------
in /etc/hosts:
27.0.0.1 mymachine.example.net hostname
-------------------------------------------------------
in /etc/hostname:
mymachine.example.net
-------------------------------------------------------
in /etc/apache2/conf/apache2.conf
ServerName mymachine.example.net
-------------------------------------------------------

is that correct?
now apache starts without problems (apache2ctl start) but when i attempt to connect to it (i type in a browser for example mozilla, "http://localhost:80") i still get an error (localhost could not be found)...

what can i do?
thanks

mrosati 06-03-2004 11:55 AM

sorry, that was probably an error caused by my browser.
using opera enerything works fine.

thank for your help!!

Matteo

mrosati 06-03-2004 12:02 PM

uhmmmmmmm.... there is still an error....
i can see normal pages... but when i try to open php pages i only see the text that is contained into the page, for example if i try to open this page:

<?php
phpinfo();
?>

the browser shows exactly

<?php
phpinfo();
?>

it seems that it does not recognize php code... is there a file or a config utility where i can enable it?

JJX 06-03-2004 12:18 PM

Maybe u need to load a module (for apache) for php

Pete M 06-03-2004 12:49 PM

mrosati

First off I'm using Redhat so not sure if it's the same

Check if you have a file '/etc/httpd/conf.d/php.conf'

Open '/etc/httpd/conf/httpd.conf'' with your chosen text editor, make sure this is uncommented

# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf

If the answer to all the above is yes PHP should be good to go

Pete


All times are GMT -5. The time now is 10:49 AM.