Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

Użytkownik


Witam.. walcze z apache'm juz chyba 13 godzin.. z przerwa na wc i jedzenie..
zalamuje juz rece..
nie mam pojecia czemu nie chodzi..
instalowalem go z
apt-get install apache
wszystko oki
szybko poszlo :P
w etc/hosts
zmienilem 127.0.0.1 na moj ip serwera w sieci (lokalny)
wklepuje w przegladarce http://192.168.1.1/
nie mozna wyswietlic strony..
sprawdzalem procesy i wszystko prawidlowo.. apache byl uruchomiony..
no nic.. nie poddalem sie..
apt-get remove --purge apache
polecialem go od nowa.. tym razem ze zrodel..
jak zwykle kompilacja itp bez problemu.. tyle ze :]
apach nie chodzil :D
chcialem pousuwac wszystkie te smieci jakie pozostawaly mi po instalacjach i sprobowac jeszcze raz od nowa tyle ze teraz apt wywala mi:
wazow5:~# apt-get install apache
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności... Gotowe
Sugerowane pakiety:
apache-doc
Zostaną zainstalowane następujące NOWE pakiety:
apache
0 zaktualizowanych, 1 nowo zainstalowanych, 0 do usunięcia i 0 nie zaktualizowanych.
Konieczne pobranie 385kB archiwów.
Po rozpakowaniu zostanie dodatkowo użyte 831kB miejsca na dysku.
Pob: 1 http://ftp.pl.debian.org stable/main apache 1.3.33-6sarge1 [385kB]
Pobrano 385kB w 1s (251kB/s)
Prekonfiguracja pakietów ...
Zaznaczenie poprzednio niezaznaczonego pakietu apache.
(Odczytywanie bazy danych ... 25537 plików i katalogów obecnie zainstalowanych.)
Rozpakowanie apache (z .../apache_1.3.33-6sarge1_i386.deb) ...
Konfigurowanie apache (1.3.33-6sarge1) ...
/var/lib/dpkg/info/apache.postinst: line 12: /usr/share/apache/postinst.common: Nie ma takiego pliku ani katalogu
dpkg: błąd przetwarzania apache (--configure):
podproces post-installation script zwrócił kod błędu 1
Wystąpiły błędy podczas przetwarzania:
apache
E: Sub-process /usr/bin/dpkg returned an error code (1)
wezcie poradzcie..
moje pytanie brzmi inaczje juz :D
gdzie znajde pliki ktorymi moglbym uzupelnic braki w
usr/share/apatche/
UPDATE
pozbylem sie wszystkiego co zwiazane z apache i postanowilem sprobowac z apache2
instalacja Ok
tylko..
w konfigu jakis problem..
"ServerRoot /usr/local/apache2"
Listen nasze_ip:80
Listen nasze_ip:443
ServerName nasze_ip
DocumentRoot "/home/www" - powiedzmy że takie
<Directory "/home/www">
Options Indexes FollowSymLinks
....
</Directory>
DirectoryIndex index.html index.htm
AddDefaultCharset ISO-8859-2 ( tej linijki w httpd.conf nie znajdziemy, trzeba ją dopisać )
NameVirtualHost nasze_ip:80
NameVirtualHost nasze_ip:443
przy wpisaniu komendy apache
wyrzuca:
Syntax error on line 6 of /etc/apache2/httpd.conf:
Invalid command 'ServerRoot /usr/local/apache2', perhaps mis-spelled or defined by a module not included in the server configuration
Offline


Członek DUG



1) serverroot chyba nie musi być w ""
2) z tego co się orientuję to serverroot to jest folder z configami prawdopodobnie /etc/apache2
Offline

Użytkownik


w sumie zrobilem maly postep
cos pozmienialem.. serwer wlancza sie i wylancza.. bez errorow
moj httpd.conf wyglada tak:
ServerRoot /usr/share/apache2
Listen 192.168.1.1:81
Listen 192.168.1.1:443
ServerName 192.168.1.1
DocumentRoot "/home/www"
DirectoryIndex index.html index.htm
AddDefaultCharset ISO-8859-2
tylko jedna rzecz mi sie nie podoba..
4096 ? 00:00:00 apache2
4097 ? 00:00:00 apache2
4098 ? 00:00:00 apache2
4099 ? 00:00:00 apache2
4100 ? 00:00:00 apache2
4101 ? 00:00:00 apache2
4104 ? 00:00:00 apache2
4105 ? 00:00:00 apache2
4106 ? 00:00:00 apache2
4107 ? 00:00:00 apache2
4108 ? 00:00:00 apache2
4109 ? 00:00:00 apache2
4110 ? 00:00:00 apache2
4111 ? 00:00:00 apache2
4112 ? 00:00:00 apache2
4113 ? 00:00:00 apache2
4114 ? 00:00:00 apache2
4115 ? 00:00:00 apache2
4116 ? 00:00:00 apache2
4117 ? 00:00:00 apache2
4118 ? 00:00:00 apache2
4119 ? 00:00:00 apache2
4120 ? 00:00:00 apache2
4121 ? 00:00:00 apache2
4122 ? 00:00:00 apache2
4123 ? 00:00:00 apache2
4124 ? 00:00:00 apache2
4125 ? 00:00:00 apache2
4126 ? 00:00:00 apache2
4127 ? 00:00:00 apache2
4128 ? 00:00:00 apache2
4129 ? 00:00:00 apache2
4130 ? 00:00:00 apache2
4131 ? 00:00:00 apache2
4132 ? 00:00:00 apache2
4133 ? 00:00:00 apache2
4134 ? 00:00:00 apache2
4135 ? 00:00:00 apache2
4136 ? 00:00:00 apache2
4137 ? 00:00:00 apache2
4138 ? 00:00:00 apache2
4139 ? 00:00:00 apache2
4140 ? 00:00:00 apache2
4141 ? 00:00:00 apache2
4142 ? 00:00:00 apache2
4143 ? 00:00:00 apache2
4144 ? 00:00:00 apache2
4145 ? 00:00:00 apache2
4146 ? 00:00:00 apache2
4147 ? 00:00:00 apache2
4148 ? 00:00:00 apache2
4149 ? 00:00:00 apache2
4150 ? 00:00:00 apache2
4151 ? 00:00:00 apache2
4152 ? 00:00:00 apache2
4153 ? 00:00:00 apache2
4154 ? 00:00:00 apache2
4155 ? 00:00:00 apache2
to chyba nie jest normalne po wklepaniu ps -A
a i jeszcze jedno wg takiej konfiguracji przy wklepywaniu adresu na kompie w lanie strona powinna odpalac sie przy
http://192.168.1.1/ ?
Offline


Członek DUG



Prosze przykładowy config
ServerRoot "/usr/local/apache2/"
#to jest do czytania userów
UserDir public_html
#żeby nieczytało roota
UserDir disabled root
Listen 80
Listen 443
#mozna też Listen ip:port
<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
User www
Group www
</IfModule>
</IfModule>
#nazwa serwera albo ip
ServerName 192.168.1.1
#z kad ma być serwowana główna strona
DocumentRoot "/home/www"
AddDefaultCharset ISO-8859-2
DefaultType text/plain
LoadModule php5_module modules/libphp5.so
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php5
DirectoryIndex index.html index.htm index.php index.cgi index.pl
AddHandler cgi-script .cgi .pl
<FilesMatch "^.ht">
Order allow,deny
Deny from all
</FilesMatch>
ErrorLog /var/log/apache/error_log
LogLevel warn
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i""%{User-Agent}i""combined
LogFormat "%h %l %u %t "%r" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i""%{User-Agent}i"%I %O" combinedio
</IfModule>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog logs/access_log common
#
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access_log combined
</IfModule>
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
</IfModule>
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
# For files that include their own HTTP headers:
#AddHandler send-as-is asis
# For server-parsed imagemap files:
#AddHandler imap-file map
# For type maps (negotiated resources):
#AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
<Directory />
AllowOverride None
</Directory>
#katalog z prawami do cgi
<Directory /usr/local/apache2/cgi-bin/>
Options +ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/home/*/public_html/cgi">
AllowOverride All
</Directory>
<Directory "/home/www/default">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Jak dajesz
Listen 192.168.1.1:81
To strona będzie pod
http//192.168.1.1:81
Offline

Użytkownik


Problem rozwiazany! strona nie wyswietlala sie gdyz blokowal ja firewall ktory robilem z waszej stronki..
tzn trzeba bylo w iptables dodac takie same zasady jak np dla portu ssh
mam nadzieje ze ktos dzieki temu nie bedzie musial sie tyle glowic co ja :P
Offline
Użytkownik

tylko jedna rzecz mi sie nie podoba..
4096 ? 00:00:00 apache2
4097 ? 00:00:00 apache2 [...]
zmniejsz ilosc uruchamianych serwerow.
Offline