View previous topic :: View next topic |
Author |
Message |
minsoehan Tux's lil' helper
Joined: 02 Jan 2015 Posts: 101 Location: Yangon, Burma. (Mother Su's Country)
|
Posted: Wed Mar 09, 2016 11:05 am Post subject: [SOLVED] apache2 failed to start? |
|
|
I installed apache
Code: | * www-servers/apache
Latest version available: 2.4.18
Latest version installed: 2.4.18
Size of files: 5,084 KiB
Homepage: http://httpd.apache.org/
Description: The Apache Web Server
License: Apache-2.0 Apache-1.1 |
now I can not start apache
Code: | msh@duyinthee ~ $ sudo /etc/init.d/apache2 start
Password:
* Starting apache2 ...
AH00557: apache2: apr_sockaddr_info_get() failed for duyinthee
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
* start-stop-daemon: failed to start `/usr/sbin/apache2' [ !! ]
* ERROR: apache2 failed to start |
I added "ServerName localhost" to /etc/apache2/httpd.conf file and start again but still not work saying
Code: | msh@duyinthee ~ $ sudo /etc/init.d/apache2 start
* Starting apache2 ...
* start-stop-daemon: failed to start `/usr/sbin/apache2' [ !! ]
* ERROR: apache2 failed to start |
my /etc/apache2/httpd.conf file is here:
Code: | # This is a modification of the default Apache 2.4 configuration file
# for Gentoo Linux.
#
# Support:
# http://www.gentoo.org/main/en/lists.xml [mailing lists]
# http://forums.gentoo.org/ [web forums]
# irc://irc.freenode.net#gentoo-apache [irc chat]
#
# Bug Reports:
# http://bugs.gentoo.org [gentoo related bugs]
# http://httpd.apache.org/bug_report.html [apache httpd related bugs]
#
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "var/log/apache2/foo_log"
# with ServerRoot set to "/usr" will be interpreted by the
# server as "/usr/var/log/apache2/foo.log".
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk. If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
# Comment: The LockFile directive has been replaced by the Mutex directive
ServerRoot "/usr/lib64/apache2"
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
# GENTOO: Automatically defined based on APACHE2_MODULES USE_EXPAND variable.
# Do not change manually, it will be overwritten on upgrade.
#
# The following modules are considered as the default configuration.
# If you wish to disable one of them, you may have to alter other
# configuration directives.
#
# Change these at your own risk!
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_file_module modules/mod_authn_file.so
<IfDefine AUTHNZ_LDAP>
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
</IfDefine>
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
<IfDefine CACHE>
LoadModule cache_module modules/mod_cache.so
</IfDefine>
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
<IfDefine DAV>
LoadModule dav_module modules/mod_dav.so
</IfDefine>
<IfDefine DAV>
LoadModule dav_fs_module modules/mod_dav_fs.so
</IfDefine>
<IfDefine DAV>
LoadModule dav_lock_module modules/mod_dav_lock.so
</IfDefine>
LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule ext_filter_module modules/mod_ext_filter.so
<IfDefine CACHE>
LoadModule file_cache_module modules/mod_file_cache.so
</IfDefine>
LoadModule filter_module modules/mod_filter.so
LoadModule headers_module modules/mod_headers.so
LoadModule include_module modules/mod_include.so
<IfDefine INFO>
LoadModule info_module modules/mod_info.so
</IfDefine>
<IfDefine LDAP>
LoadModule ldap_module modules/mod_ldap.so
</IfDefine>
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule mime_module modules/mod_mime.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
<IfDefine SSL>
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
</IfDefine>
LoadModule speling_module modules/mod_speling.so
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
<IfDefine STATUS>
LoadModule status_module modules/mod_status.so
</IfDefine>
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule unixd_module modules/mod_unixd.so
<IfDefine USERDIR>
LoadModule userdir_module modules/mod_userdir.so
</IfDefine>
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
User apache
Group apache
# Supplemental configuration
#
# Most of the configuration files in the /etc/apache2/modules.d/ directory can
# be turned on using APACHE2_OPTS in /etc/conf.d/apache2 to add extra features
# or to modify the default configuration of the server.
#
# To know which flag to add to APACHE2_OPTS, look at the first line of the
# the file, which will usually be an <IfDefine OPTION> where OPTION is the
# flag to use.
Include /etc/apache2/modules.d/*.conf
# Virtual-host support
#
# Gentoo has made using virtual-hosts easy. In /etc/apache2/vhosts.d/ we
# include a default vhost (enabled by adding -D DEFAULT_VHOST to
# APACHE2_OPTS in /etc/conf.d/apache2).
Include /etc/apache2/vhosts.d/*.conf
# vim: ts=4 filetype=apache
ServerName localhost |
thanks in advance for any help.
Last edited by minsoehan on Wed Mar 09, 2016 3:44 pm; edited 1 time in total |
|
Back to top |
|
|
chiefbag Guru
Joined: 01 Oct 2010 Posts: 542 Location: The Kingdom
|
Posted: Wed Mar 09, 2016 12:26 pm Post subject: |
|
|
You will need to post some logs, what for example is the output of the following as Root?
Code: | cat /var/log/apache2/error_log |
EDIT vhosts.d/00_default_vhost.conf would be the place to set "ServerName localhost" not https.conf |
|
Back to top |
|
|
minsoehan Tux's lil' helper
Joined: 02 Jan 2015 Posts: 101 Location: Yangon, Burma. (Mother Su's Country)
|
Posted: Wed Mar 09, 2016 3:36 pm Post subject: |
|
|
Now it works.
Honestly I sometime am very stupid. I should reboot my machine if every measure of troubleshooting doesn't work.
Today I installed and start apache at office in failure. Then shutdown computer and come back home.
When back home, start computer and start apache.
Bingo! it works without any touch to any configuration file.
Thanks for reply.
"ServerName localhost" is already in /etc/apache2/vhosts.d/00_default_vhosts.conf file.
if I remove "ServerName localhost" from /etc/apache2/httpd.conf file, the message
Code: | AH00557: apache2: apr_sockaddr_info_get() failed for duyinthee
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message |
came back. So I have no idea what is what. Just still testing and checking.
BTW:
Code: | msh@duyinthee ~ $ sudo cat /var/log/apache2/error_log
[Wed Mar 09 14:46:48.670174 2016] [unique_id:alert] [pid 15179] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "duyinthee"
AH00016: Configuration Failed
[Wed Mar 09 15:30:12.073525 2016] [unique_id:alert] [pid 19093] (EAI 3)Temporary failure in name resolution: AH01564: unable to find IPv4 address of "duyinthee"
AH00016: Configuration Failed
[Wed Mar 09 15:36:30.105008 2016] [unique_id:alert] [pid 19719] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "duyinthee"
AH00016: Configuration Failed
[Wed Mar 09 17:10:22.495142 2016] [unique_id:alert] [pid 6662] (EAI 3)Temporary failure in name resolution: AH01564: unable to find IPv4 address of "duyinthee"
AH00016: Configuration Failed
[Wed Mar 09 17:25:41.256309 2016] [unique_id:alert] [pid 8103] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "duyinthee"
AH00016: Configuration Failed
[Wed Mar 09 17:29:38.855999 2016] [unique_id:alert] [pid 8495] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "duyinthee"
AH00016: Configuration Failed
[Wed Mar 09 21:35:08.002953 2016] [mpm_prefork:notice] [pid 6571] AH00163: Apache/2.4.18 (Unix) OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Mar 09 21:35:08.003069 2016] [core:notice] [pid 6571] AH00094: Command line: '/usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -d /usr/lib64/apache2 -f /etc/apache2/httpd.conf' |
last line must be message of successfully start of apache2. Share me if there is any message worth to note in there. |
|
Back to top |
|
|
alienjon Veteran
Joined: 09 Feb 2005 Posts: 1709
|
Posted: Sun Mar 20, 2016 9:28 pm Post subject: |
|
|
minsoehan wrote: | "ServerName localhost" is already in /etc/apache2/vhosts.d/00_default_vhosts.conf file.
if I remove "ServerName localhost" from /etc/apache2/httpd.conf file, the message |
Same here. I'm going to keep it in httpd.conf for now unless I find a better method. Thanks for the rest of the troubleshooting, BTW, I found it helpful! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|