# [SOLVED]apache2 nie startuje

## plusz01

Witam!

Mam pewien problem z apache2 a mianowicie:

gry uruchamiam apache2:

 *Quote:*   

> /etc/init.d/apache2 start

 

to wyskakuje mi blad

```

httpd (no pid file) not running

```

gdy zas uruchomie apache tak

```

apache2 -f /etc/apache2/httpd.conf 

```

apache działa ale nie działa php prosze o pomocLast edited by plusz01 on Fri Oct 16, 2009 4:35 pm; edited 1 time in total

----------

## Bialy

```
cat /etc/conf.d/apache2

cat /etc/apache2/httpd.conf

cat /etc/hosts
```

PS. Myślę, że temat powinieneś założyć w Polskie forum (Polish)  :Wink: 

----------

## acei

```
cat /etc/conf.d/hostname

eix -I apache2
```

też się przyda.

----------

## Kurt Steiner

Moved from Instalacja i sprzęt to Polskie forum (Polish).

----------

## plusz01

Na początku przepraszam za umieszczenie w złym dziale aha dorzucam jeszcze vhosty "cat /etc/apache2/vhosts.d/00_default_vhost.conf" bo tez ich uzywam

```

plusz ~ # cat /etc/conf.d/apache2 | grep -vE '^(#|$)'

APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5"

PIDFILE=/var/run/apache2.pid

CONFIGFILE=/etc/apache2/httpd.conf

```

```

plusz ~ # cat /etc/apache2/httpd.conf | grep -vE '^(#|$)'                       

ServerRoot "/usr/lib/apache2"

LoadModule actions_module modules/mod_actions.so

LoadModule alias_module modules/mod_alias.so

LoadModule auth_basic_module modules/mod_auth_basic.so

<IfDefine AUTH_DIGEST>

LoadModule auth_digest_module modules/mod_auth_digest.so

</IfDefine>

LoadModule authn_anon_module modules/mod_authn_anon.so

LoadModule authn_dbd_module modules/mod_authn_dbd.so

LoadModule authn_dbm_module modules/mod_authn_dbm.so

LoadModule authn_default_module modules/mod_authn_default.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_dbm_module modules/mod_authz_dbm.so

LoadModule authz_default_module modules/mod_authz_default.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

<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 dbd_module modules/mod_dbd.so

LoadModule deflate_module modules/mod_deflate.so

LoadModule dir_module modules/mod_dir.so

<IfDefine CACHE>

LoadModule disk_cache_module modules/mod_disk_cache.so

</IfDefine>

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 ident_module modules/mod_ident.so

LoadModule imagemap_module modules/mod_imagemap.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

<IfDefine CACHE>

LoadModule mem_cache_module modules/mod_mem_cache.so

</IfDefine>

LoadModule mime_module modules/mod_mime.so

LoadModule mime_magic_module modules/mod_mime_magic.so

LoadModule negotiation_module modules/mod_negotiation.so

<IfDefine PROXY>

LoadModule proxy_module modules/mod_proxy.so

</IfDefine>

<IfDefine PROXY>

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

</IfDefine>

<IfDefine PROXY>

LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

</IfDefine>

<IfDefine PROXY>

LoadModule proxy_connect_module modules/mod_proxy_connect.so

</IfDefine>

<IfDefine PROXY>

LoadModule proxy_http_module modules/mod_proxy_http.so

</IfDefine>

LoadModule rewrite_module modules/mod_rewrite.so

LoadModule setenvif_module modules/mod_setenvif.so

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

<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

User apache

Group apache

Include /etc/apache2/modules.d/*.conf

Include /etc/apache2/vhosts.d/*.conf

```

```

plusz ~ # cat /etc/apache2/vhosts.d/00_default_vhost.conf | grep -vE '^(#|$)'

Listen 80

NameVirtualHost *:80

<VirtualHost *:80>

ServerName plusz.homeftp.net

ServerAdmin admin@plusz.homeftp.net

DocumentRoot "/var/www/localhost/htdocs"

<Directory "/var/www/localhost/htdocs">

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from all

</Directory>

<IfModule alias_module>

        ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/"

</IfModule>

<Directory "/var/www/localhost/cgi-bin">

        AllowOverride None

        Options None

        Order allow,deny

        Allow from all

</Directory>

<IfModule mpm_peruser_module>

        ServerEnvironment apache apache

</IfModule>

</VirtualHost>

<VirtualHost *:80>

ServerName test.plusz.homeftp.net

ServerAdmin test@plusz.homeftp.net

ErrorLog  /home/test/log/error.log

CustomLog /home/test/log/access.log combined

DocumentRoot "/home/test/public_www"

<Directory "/home/test/public_www">

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from all

</Directory>

<IfModule alias_module>

        ScriptAlias /cgi-bin/ "/home/test/cgi-bin/"

</IfModule>

<Directory "/home/test/cgi-bin">

        AllowOverride None

        Options None

        Order allow,deny

        Allow from all

</Directory>

<IfModule mpm_peruser_module>

        ServerEnvironment apache apache

</IfModule>

</VirtualHost>

<VirtualHost *:80>

ServerName szklo.plusz.homeftp.net

ServerAdmin szklo@plusz.homeftp.net

ErrorLog  /home/szklo/log/error.log

CustomLog /home/szklo/log/access.log combined

DocumentRoot "/home/szklo/public_www"

<Directory "/home/szklo/public_www">

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from all

</Directory>

<IfModule alias_module>

        ScriptAlias /cgi-bin/ "/home/szklo/cgi-bin"

</IfModule>

<Directory "/home/szklo/cgi-bin">

        AllowOverride None

        Options None

        Order allow,deny

        Allow from all

</Directory>

<IfModule mpm_peruser_module>

        ServerEnvironment apache apache

</IfModule>

</VirtualHost>

<VirtualHost *:80>

ServerName szkola.plusz.homeftp.net

ServerAdmin szkola@plusz.homeftp.net

ErrorLog  /home/szkola/log/error.log

CustomLog /home/szkola/log/access.log combined

DocumentRoot "/home/szkola/public_www"

<Directory "/home/szkola/public_www">

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from all

</Directory>

<IfModule alias_module>

        ScriptAlias /cgi-bin/ "/home/szkola/cgi-bin"

</IfModule>

<Directory "/home/szkola/cgi-bin">

        AllowOverride None

        Options None

        Order allow,deny

        Allow from all

</Directory>

<IfModule mpm_peruser_module>

        ServerEnvironment apache apache

</IfModule>

</VirtualHost>

<VirtualHost *:80>

ServerName plusz.plusz.homeftp.net

ServerAdmin plusz@plusz.homeftp.net

ErrorLog  /home/plusz/log/error.log

CustomLog /home/plusz/log/access.log combined

DocumentRoot "/home/plusz/public_www"

<Directory "/home/plusz/public_www">

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from all

</Directory>

<IfModule alias_module>

        ScriptAlias /cgi-bin/ "/home/plusz/cgi-bin"

</IfModule>

<Directory "/home/plusz/cgi-bin">

        AllowOverride None

        Options None

        Order allow,deny

        Allow from all

</Directory>

<IfModule mpm_peruser_module>

        ServerEnvironment apache apache

</IfModule>

</VirtualHost>

<VirtualHost *:80>

ServerName sub.plusz.homeftp.net

ServerAdmin sub@plusz.homeftp.net

ErrorLog  /home/sub/log/error.log

CustomLog /home/sub/log/access.log combined

DocumentRoot "/home/sub/public_www"

<Directory "/home/sub/public_www">

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from all

</Directory>

<IfModule alias_module>

        ScriptAlias /cgi-bin/ "/home/sub/cgi-bin"

</IfModule>

<Directory "/home/sub/cgi-bin">

        AllowOverride None

        Options None

        Order allow,deny

        Allow from all

</Directory>

<IfModule mpm_peruser_module>

        ServerEnvironment apache apache

</IfModule>

</VirtualHost>

<VirtualHost *:80>

ServerName swierad.plusz.homeftp.net

ServerAdmin swierad@plusz.homeftp.net

ErrorLog  /home/swierad/log/error.log

CustomLog /home/swierad/log/access.log combined

DocumentRoot "/home/swierad/public_www"

<Directory "/home/swierad/public_www">

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from all

</Directory>

<IfModule alias_module>

        ScriptAlias /cgi-bin/ "/home/swierad/cgi-bin"

</IfModule>

<Directory "/home/swierad/cgi-bin">

        AllowOverride None

        Options None

        Order allow,deny

        Allow from all

</Directory>

<IfModule mpm_peruser_module>

        ServerEnvironment apache apache

</IfModule>

</VirtualHost>

```

```

plusz ~ # cat /etc/hosts | grep -vE '^(#|$)'

127.0.0.1       plusz.homeftp.net localhost

```

```
plusz ~ # cat /etc/conf.d/hostname

HOSTNAME="plusz.homeftp.net"
```

```

plusz ~ # eix -I apache | grep -vE '^(#|$)'

[I] app-admin/apache-tools

     Available versions:  2.2.11!t ~2.2.12!t ~2.2.13!t ~2.2.14!t {ssl}

     Installed versions:  2.2.11!t(15:53:03 10/14/09)(ssl)

     Homepage:            http://httpd.apache.org/

     Description:         Useful Apache tools - htdigest, htpasswd, ab, htdbm

[I] www-servers/apache

     Available versions:  (2)  2.2.11-r2 ~2.2.13 ~2.2.13-r1 ~2.2.14 ~2.2.14-r1

        {apache2_modules_actions apache2_modules_alias apache2_modules_asis apache2_modules_auth_basic apache2_modules_auth_digest apache2_modules_authn_alias apache2_modules_authn_anon apache2_modules_authn_dbd apache2_modules_authn_dbm apache2_modules_authn_default apache2_modules_authn_file apache2_modules_authz_dbm apache2_modules_authz_default apache2_modules_authz_groupfile apache2_modules_authz_host apache2_modules_authz_owner apache2_modules_authz_user apache2_modules_autoindex apache2_modules_cache apache2_modules_cern_meta apache2_modules_charset_lite apache2_modules_dav apache2_modules_dav_fs apache2_modules_dav_lock apache2_modules_dbd apache2_modules_deflate apache2_modules_dir apache2_modules_disk_cache apache2_modules_dumpio apache2_modules_env apache2_modules_expires apache2_modules_ext_filter apache2_modules_file_cache apache2_modules_filter apache2_modules_headers apache2_modules_ident apache2_modules_imagemap apache2_modules_include apache2_modules_info apache2_modules_log_config apache2_modules_log_forensic apache2_modules_logio apache2_modules_mem_cache apache2_modules_mime apache2_modules_mime_magic apache2_modules_negotiation apache2_modules_proxy apache2_modules_proxy_ajp apache2_modules_proxy_balancer apache2_modules_proxy_connect apache2_modules_proxy_ftp apache2_modules_proxy_http apache2_modules_rewrite apache2_modules_setenvif apache2_modules_speling apache2_modules_status apache2_modules_substitute apache2_modules_unique_id apache2_modules_userdir apache2_modules_usertrack apache2_modules_version apache2_modules_vhost_alias apache2_mpms_event apache2_mpms_itk apache2_mpms_peruser apache2_mpms_prefork apache2_mpms_worker debug doc ldap peruser_dc selinux sni ssl static suexec threads}

     Installed versions:  2.2.11-r2(2)(07:51:50 10/16/09)(apache2_modules_actions apache2_modules_alias apache2_modules_auth_basic apache2_modules_auth_digest apache2_modules_authn_anon apache2_modules_authn_dbd apache2_modules_authn_dbm apache2_modules_authn_default apache2_modules_authn_file apache2_modules_authz_dbm apache2_modules_authz_default apache2_modules_authz_groupfile apache2_modules_authz_host apache2_modules_authz_owner apache2_modules_authz_user apache2_modules_autoindex apache2_modules_cache apache2_modules_dav apache2_modules_dav_fs apache2_modules_dav_lock apache2_modules_dbd apache2_modules_deflate apache2_modules_dir apache2_modules_disk_cache apache2_modules_env apache2_modules_expires apache2_modules_ext_filter apache2_modules_file_cache apache2_modules_filter apache2_modules_headers apache2_modules_ident apache2_modules_imagemap apache2_modules_include apache2_modules_info apache2_modules_log_config apache2_modules_logio apache2_modules_mem_cache apache2_modules_mime apache2_modules_mime_magic apache2_modules_negotiation apache2_modules_proxy apache2_modules_proxy_ajp apache2_modules_proxy_balancer apache2_modules_proxy_connect apache2_modules_proxy_http apache2_modules_rewrite apache2_modules_setenvif apache2_modules_speling apache2_modules_status apache2_modules_unique_id apache2_modules_userdir apache2_modules_usertrack apache2_modules_vhost_alias ldap ssl -apache2_modules_asis -apache2_modules_authn_alias -apache2_modules_cern_meta -apache2_modules_charset_lite -apache2_modules_dumpio -apache2_modules_log_forensic -apache2_modules_proxy_ftp -apache2_modules_substitute -apache2_modules_version -apache2_mpms_event -apache2_mpms_itk -apache2_mpms_peruser -apache2_mpms_prefork -apache2_mpms_worker -debug -doc -selinux -sni -static -suexec -threads)

     Homepage:            http://httpd.apache.org/

     Description:         The Apache Web Server.

Found 2 matches.
```

[/code]Last edited by plusz01 on Fri Oct 16, 2009 1:21 pm; edited 1 time in total

----------

## Kurt Steiner

plusz01, odśwież sobie znajomość regulaminu. Punkt 8 się kłania...

----------

## plusz01

Witam juz wszystko działa jak powinno poprostu zmieniłem linijkę w httpd.conf z

```
Include /etc/apache2/vhosts.d/*.conf
```

na 

```
Include /etc/apache2/vhosts.d/00_default.vhost.conf
```

zadziałało

----------

