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/.
Witam
Mam dość dziwny problem po ostatniej aktualizacji (przez webmina) serwer (VPS postawiony debian 7, apache, mysql, ispconfig3) nie chce mi wyswietlic ekramu logowania do phpmyadmin, dostaje tylko taki komunikat na stronie:
Link to database cannot be established: SQLSTATE[28000] [1045] Access denied for user 'db3presta'@'localhost' (using password: YES)
a to nie koniec problemów bo roundcube zamiast wyswietlac ekran logowania do poczty to wyswietla plik konfiguracyjny:
| +-------------------------------------------------------------------------+ */ // include environment require_once 'program/include/iniset.php'; // init application, start session, init output class, etc. $RCMAIL = rcmail::get_instance(); // Make the whole PHP output non-cacheable (#1487797) $RCMAIL->output->nocacheing_headers(); // turn on output buffering ob_start(); // check if config files had errors if ($err_str = $RCMAIL->config->get_error()) { rcmail::raise_error(array( 'code' => 601, 'type' => 'php', 'message' => $err_str), false, true); } // check DB connections and exit on failure if ($err_str = $RCMAIL->db->is_error()) { rcmail::raise_error(array( 'code' => 603, 'type' => 'db', 'message' => $err_str), FALSE, TRUE); } // error steps if ($RCMAIL->action == 'error' && !empty($_GET['_code'])) { rcmail::raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE); } // check if https is required (for login) and redirect if necessary if (empty($_SESSION['user_id']) && ($force_https = $RCMAIL->config->get('force_https', false))) { $https_port = is_bool($force_https) ? 443 : $force_https; if (!rcube_utils::https_check($https_port)) { $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); $host .= ($https_port != 443 ? ':' . $https_port : ''); header('Location: https://' . $host . $_SERVER['REQUEST_URI']); exit; } } // trigger startup plugin hook $startup = $RCMAIL->plugins->exec_hook('startup', array('task' => $RCMAIL->task, 'action' => $RCMAIL->action)); $RCMAIL->set_task($startup['task']); $RCMAIL->action = $startup['action']; // try to log in if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { $request_valid = $_SESSION['temp'] && $RCMAIL->check_request(rcube_utils::INPUT_POST, 'login'); // purge the session in case of new login when a session already exists $RCMAIL->kill_session(); $auth = $RCMAIL->plugins->exec_hook('authenticate', array( 'host' => $RCMAIL->autoselect_host(), 'user' => trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST)), 'pass' => rcube_utils::get_input_value('_pass', rcube_utils::INPUT_POST, true, $RCMAIL->config->get('password_charset', 'ISO-8859-1')), 'cookiecheck' => true, 'valid' => $request_valid, )); // Login if ($auth['valid'] && !$auth['abort'] && $RCMAIL->login($auth['user'], $auth['pass'], $auth['host'], $auth['cookiecheck']) ) { // create new session ID, don't destroy the current session // it was destroyed already by $RCMAIL->kill_session() above $RCMAIL->session->remove('temp'); $RCMAIL->session->regenerate_id(false); // send auth cookie if necessary $RCMAIL->session->set_auth_cookie(); // log successful login $RCMAIL->log_login(); // restore original request parameters $query = array(); if ($url = rcube_utils::get_input_value('_url', rcube_utils::INPUT_POST)) { parse_str($url, $query); // prevent endless looping on login page if ($query['_task'] == 'login') unset($query['_task']); // prevent redirect to compose with specified ID (#1488226) if ($query['_action'] == 'compose' && !empty($query['_id'])) $query = array(); } // allow plugins to control the redirect url after login success $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail')); unset($redir['abort'], $redir['_err']); // send redirect $OUTPUT->redirect($redir); } else { if (!$auth['valid']) { $error_code = RCMAIL::ERROR_INVALID_REQUEST; } else { $error_code = $auth['error'] ? $auth['error'] : $RCMAIL->login_error(); } $error_labels = array( RCMAIL::ERROR_STORAGE => 'storageerror', RCMAIL::ERROR_COOKIES_DISABLED => 'cookiesdisabled', RCMAIL::ERROR_INVALID_REQUEST => 'invalidrequest', RCMAIL::ERROR_INVALID_HOST => 'invalidhost', ); $error_message = $error_labels[$error_code] ? $error_labels[$error_code] : 'loginfailed'; $OUTPUT->show_message($error_message, 'warning'); $RCMAIL->plugins->exec_hook('login_failed', array( 'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user'])); $RCMAIL->kill_session(); } } // end session (after optional referer check) else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcube_utils::check_referer())) { $userdata = array( 'user' => $_SESSION['username'], 'host' => $_SESSION['storage_host'], 'lang' => $RCMAIL->user->language, ); $OUTPUT->show_message('loggedout'); $RCMAIL->logout_actions(); $RCMAIL->kill_session(); $RCMAIL->plugins->exec_hook('logout_after', $userdata); } // check session and auth cookie else if ($RCMAIL->task != 'login' && $_SESSION['user_id'] && $RCMAIL->action != 'send') { if (!$RCMAIL->session->check_auth()) { $RCMAIL->kill_session(); $session_error = true; } } // not logged in -> show login page if (empty($RCMAIL->user->ID)) { // log session failures $task = rcube_utils::get_input_value('_task', rcube_utils::INPUT_GPC); if ($task && !in_array($task, array('login','logout')) && !$session_error && ($sess_id = $_COOKIE[ini_get('session.name')])) { $RCMAIL->session->log("Aborted session " . $sess_id . "; no valid session data found"); $session_error = true; } if ($OUTPUT->ajax_call) $OUTPUT->redirect(array('_err' => 'session'), 2000); if (!empty($_REQUEST['_framed'])) $OUTPUT->command('redirect', $RCMAIL->url(array('_err' => 'session'))); // check if installer is still active if ($RCMAIL->config->get('enable_installer') && is_readable('./installer/index.php')) { $OUTPUT->add_footer(html::div(array('style' => "background:#ef9398; border:2px solid #dc5757; padding:0.5em; margin:2em auto; width:50em"), html::tag('h2', array('style' => "margin-top:0.2em"), "Installer script is still accessible") . html::p(null, "The install script of your Roundcube installation is still stored in its default location!") . html::p(null, "Please remove the whole installer folder from the Roundcube directory because . these files may expose sensitive configuration data like server passwords and encryption keys to the public. Make sure you cannot access the installer script from your browser.") ) ); } if ($session_error || $_REQUEST['_err'] == 'session') $OUTPUT->show_message('sessionerror', 'error', null, true, -1); $plugin = $RCMAIL->plugins->exec_hook('unauthenticated', array('task' => 'login', 'error' => $session_error)); $RCMAIL->set_task($plugin['task']); $OUTPUT->send($plugin['task']); } // CSRF prevention else { // don't check for valid request tokens in these actions $request_check_whitelist = array('login'=>1, 'spell'=>1, 'spell_html'=>1); if (!$request_check_whitelist[$RCMAIL->action]) { // check client X-header to verify request origin if ($OUTPUT->ajax_call) { if (rcube_utils::request_header('X-Roundcube-Request') != $RCMAIL->get_request_token()) { header('HTTP/1.1 403 Forbidden'); die("Invalid Request"); } } // check request token in POST form submissions else if (!empty($_POST) && !$RCMAIL->check_request()) { $OUTPUT->show_message('invalidrequest', 'error'); $OUTPUT->send($RCMAIL->task); } // check referer if configured if ($RCMAIL->config->get('referer_check') && !rcube_utils::check_referer()) { raise_error(array( 'code' => 403, 'type' => 'php', 'message' => "Referer check failed"), true, true); } } } // we're ready, user is authenticated and the request is safe $plugin = $RCMAIL->plugins->exec_hook('ready', array('task' => $RCMAIL->task, 'action' => $RCMAIL->action)); $RCMAIL->set_task($plugin['task']); $RCMAIL->action = $plugin['action']; // handle special actions if ($RCMAIL->action == 'keep-alive') { $OUTPUT->reset(); $RCMAIL->plugins->exec_hook('keep_alive', array()); $OUTPUT->send(); } else if ($RCMAIL->action == 'save-pref') { include INSTALL_PATH . 'program/steps/utils/save_pref.inc'; } // include task specific functions if (is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/func.inc')) include_once $incfile; // allow 5 "redirects" to another action $redirects = 0; $incstep = null; while ($redirects < 5) { // execute a plugin action if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) { if (!$RCMAIL->action) $RCMAIL->action = 'index'; $RCMAIL->plugins->exec_action($RCMAIL->task.'.'.$RCMAIL->action); break; } else if (preg_match('/^plugin\./', $RCMAIL->action)) { $RCMAIL->plugins->exec_action($RCMAIL->action); break; } // try to include the step file else if (($stepfile = $RCMAIL->get_action_file()) && is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/'.$stepfile) ) { // include action file only once (in case it don't exit) include_once $incfile; $redirects++; } else { break; } } if ($RCMAIL->action == 'refresh') { $RCMAIL->plugins->exec_hook('refresh', array()); } // parse main template (default) $OUTPUT->send($RCMAIL->task); // if we arrive here, something went wrong rcmail::raise_error(array( 'code' => 404, 'type' => 'php', 'line' => __LINE__, 'file' => __FILE__, 'message' => "Invalid request"), true, true);[/quote]
inne strony działaja poprawnie tylko phpmyadmin i roundcube. Podejrzewam ze jest coś z apachem bo phpmyadmin i roundcube mają pliki konfiguracyjne w /etc/apache2/conf.d
inne strony które działaja maja swoje pliki w /etc/apache2/sites-enabled.
Proszę o pomoc.
Offline
Jak wyświetla plik konfiguracyjny?
Jaki serwer www, jak działa php (Apache, phpf-pm, fastcgi);
"Link to database cannot be established: SQLSTATE[28000] [1045] Access denied for user 'db3presta'@'localhost' (using password: YES)"
Chyba uprawnienia w bazie danych się posypały, ale bez dodatkowych informacji diabli wiedzą.
Wyświetlanie pliku konfiguracyjnego?
Tu potrzeba informacji o konfiguracji wadliwie działających usług, serwera www, interpretera php i serwera Mysql.
I naucz się, ze Debiana nie aktualizuje się przez Webmina, tylko przez [b]aptitude[/b].
To by było na tyle
Ostatnio edytowany przez Jacekalex (2015-02-23 16:09:16)
Offline
to plik konfiguracyjny apache:
# This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.2/ for detailed information about # the directives and /usr/share/doc/apache2-common/README.Debian.gz about # Debian specific hints. # # # Summary of how the Apache 2 configuration works in Debian: # The Apache 2 web server configuration in Debian is quite different to # upstream's suggested way to configure the web server. This is because Debian's # default Apache2 installation attempts to make adding and removing modules, # virtual hosts, and extra configuration directives as flexible as possible, in # order to make automating the changes and administering the server as easy as # possible. # It is split into several files forming the configuration hierarchy outlined # below, all located in the /etc/apache2/ directory: # # /etc/apache2/ # |-- apache2.conf # | `-- ports.conf # |-- mods-enabled # | |-- *.load # | `-- *.conf # |-- conf.d # | `-- * # `-- sites-enabled # `-- * # # # * apache2.conf is the main configuration file (this file). It puts the pieces # together by including all remaining configuration files when starting up the # web server. # # In order to avoid conflicts with backup files, the Include directive is # adapted to ignore files that: # - do not begin with a letter or number # - contain a character that is neither letter nor number nor _-:. # - contain .dpkg # # Yet we strongly suggest that all configuration files either end with a # .conf or .load suffix in the file name. The next Debian release will # ignore files not ending with .conf (or .load for mods-enabled). # # * ports.conf is always included from the main configuration file. It is # supposed to determine listening ports for incoming connections, and which # of these ports are used for name based virtual hosts. # # * Configuration files in the mods-enabled/ and sites-enabled/ directories # contain particular configuration snippets which manage modules or virtual # host configurations, respectively. # # They are activated by symlinking available configuration files from their # respective *-available/ counterparts. These should be managed by using our # helpers a2enmod/a2dismod, a2ensite/a2dissite. See # their respective man pages for detailed information. # # * Configuration files in the conf.d directory are either provided by other # packages or may be added by the local administrator. Local additions # should start with local- or end with .local.conf to avoid name clashes. All # files in conf.d are considered (excluding the exceptions noted above) by # the Apache 2 web server. # # * The binary is called apache2. Due to the use of environment variables, in # the default configuration, apache2 needs to be started/stopped with # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not # work with the default configuration. # Global configuration # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation (available # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # #ServerRoot "/etc/apache2" # # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. # LockFile ${APACHE_LOCK_DIR}/accept.lock # # PidFile: The file in which the server should record its process # identification number when it starts. # This needs to be set in /etc/apache2/envvars # PidFile ${APACHE_PID_FILE} # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 5 ## ## Server-Pool Size Regulation (MPM specific) ## # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> # worker MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a # graceful restart. ThreadLimit can only be changed by stopping # and starting Apache. # ThreadsPerChild: constant number of worker threads in each server process # MaxClients: maximum number of simultaneous client connections # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> # event MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxClients: maximum number of simultaneous client connections # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_event_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> # These need to be set in /etc/apache2/envvars User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy all </Files> # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # # It is also possible to omit any default MIME type and let the # client's browser guess an appropriate action instead. Typically the # browser will decide based on the file's extension then. In cases # where no good assumption can be made, letting the default MIME type # unset is suggested instead of forcing the browser to accept # incorrect metadata. # DefaultType None # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a <VirtualHost> # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a <VirtualHost> # container, that host's errors will be logged there and not here. # ErrorLog ${APACHE_LOG_DIR}/error.log # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # Include module configuration: Include mods-enabled/*.load Include mods-enabled/*.conf # Include list of ports to listen on and which to use for name based vhosts Include ports.conf # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i # LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # Include of directories ignores editors' and dpkg's backup files, # see the comments above for details. # Include generic snippets of statements Include conf.d/ # Include the virtual host configurations: Include sites-enabled/
plik konfiguracyjny phpmyadmin: /etc/apache2/conf.d/phpmyadmin.conf
Plik: # phpMyAdmin default Apache configuration Alias /phpmyadmin /usr/share/phpmyadmin <Directory /usr/share/phpmyadmin> Options FollowSymLinks DirectoryIndex index.php <IfModule mod_php5.c> AddType application/x-httpd-php .php php_flag magic_quotes_gpc Off php_flag track_vars On php_flag register_globals Off php_admin_flag allow_url_fopen Off php_value include_path . php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/ </IfModule> </Directory> # Authorize for setup <Directory /usr/share/phpmyadmin/setup> <IfModule mod_authn_file.c> AuthType Basic AuthName "phpMyAdmin Setup" AuthUserFile /etc/phpmyadmin/htpasswd.setup </IfModule> Require valid-user </Directory> # Disallow web access to directories that don't need it <Directory /usr/share/phpmyadmin/libraries> Order Deny,Allow Deny from All </Directory> <Directory /usr/share/phpmyadmin/setup/lib> Order Deny,Allow Deny from All </Directory>
a to plik roundcube: : /etc/apache2/conf.d/roundcube.conf
# Those aliases do not work properly with several hosts on your apache server # Uncomment them to use it or adapt them to your configuration Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/ Alias /roundcube /var/lib/roundcube Alias /webmail /var/lib/roundcube # Access to tinymce files <Directory "/usr/share/tinymce/www/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order allow,deny allow from all </Directory> <Directory /var/lib/roundcube/> Options +FollowSymLinks DirectoryIndex index.php <IfModule mod_php5.c> AddType application/x-httpd-php .php php_flag magic_quotes_gpc Off php_flag track_vars On php_flag register_globals Off php_value include_path .:/usr/share/php </IfModule> # This is needed to parse /var/lib/roundcube/.htaccess. See its # content before setting AllowOverride to None. AllowOverride All order allow,deny allow from all </Directory> # Protecting basic directories: <Directory /var/lib/roundcube/config> Options -FollowSymLinks AllowOverride None </Directory> <Directory /var/lib/roundcube/temp> Options -FollowSymLinks AllowOverride None Order allow,deny Deny from all </Directory> <Directory /var/lib/roundcube/logs> Options -FollowSymLinks AllowOverride None Order allow,deny Deny from all </Directory>
Offline
A co powiadają logi Apacha? Co mówią na temat błędów logi serwera Mysql?
Przyznam, że dawno się Apachem nie zajmowałem, ostatnio bliżej mi do Nginxa i Lighttpd.
I naucz się do czorta, że pliki konfiguracyjne wkleja się bez komentarzy i pustych linii, czyli używając np grepa:
egrep -v '^$|^\s*#' /etc/apache2/apache2.conf
Ostatnio edytowany przez Jacekalex (2015-02-23 18:26:04)
Offline
może lepiej ^\s*# bo bez tego wywali ci linię typu
veryimportantparameter 42 #ku pamięci
w piz... a chyba nie o to chodzi?
Offline
@up -faktycznie, poprawione.
Offline
jeszcze źle :)
ja bym dał
^\s*($|#)
ale teraz nie sprawdzę.
albo coś w tym stylu...
aha, i grep -vP chyba...
Offline
To może sami najpierw poćwiczcie, a dopiero potem pouczajcie innych jak mają logi wklejać ;)
Offline
e tam - człowiek najlepiej uczy się na błędach, a najbezpieczniej na cudzych :)
Offline
dałem to polecenie:
egrep -v '^$|^\s*#' /etc/apache2/apache2.conf
LockFile ${APACHE_LOCK_DIR}/accept.lock PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> <IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> <IfModule mpm_event_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} AccessFileName .htaccess <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy all </Files> DefaultType None HostnameLookups Off ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn Include mods-enabled/*.load Include mods-enabled/*.conf Include ports.conf LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent Include conf.d/ Include sites-enabled/
Offline
Teraz jest dużo czytelniej, fajnie, ze już umiesz wklejać konfigi na forum, ale jeszcze logi.
jak wchodzisz na stronę serwowaną Apacha, to w [b]acces.log[/b] i [b]error.log[/b] coś powinno pisać na ten temat.
Jak serwer Mysql odrzuca połączenie, to w logach serwera Mysql też coś powinno pisać na ten temat.
Pokaż jeszcze wyniki z roota:
apache2 -t
apache2 -M
Ostatnio edytowany przez Jacekalex (2015-02-23 19:04:18)
Offline
dałem to polecenie
apache2 -t
ale chybacoś...
apache2: bad user name ${APACHE_RUN_USER}
Offline
Konfigurowałeś w ogóle tego Apacha, czy to jest po samej instalacji?
pokaż tak:
source /etc/apache2/envvars apache2 -t apache2 -M
Ostatnio edytowany przez Jacekalex (2015-02-23 19:16:32)
Offline
Z tego tutka korzystałem, instalowałem to jakies 8 miesięcy temu
https://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3
tylko squirrelmaila nie instalowałem, zamieniłem na roundcuba
komenda:
/etc/apache2/envvars You have new mail in /var/mail/root
komenda
apache -t [Mon Feb 23 19:19:52 2015] [warn] The Alias directive in /etc/apache2/conf.d/roundcube.conf at line 3 will probably never match because it overlaps an earlier Alias. [Mon Feb 23 19:19:52 2015] [warn] The Alias directive in /etc/apache2/conf.d/roundcube.conf at line 4 will probably never match because it overlaps an earlier Alias. [Mon Feb 23 19:19:52 2015] [warn] The Alias directive in /etc/apache2/conf.d/roundcube.conf at line 5 will probably never match because it overlaps an earlier Alias. Syntax OK
komenda:
apache2 -M [Mon Feb 23 19:20:48 2015] [warn] The Alias directive in /etc/apache2/conf.d/roundcube.conf at line 3 will probably never match because it overlaps an earlier Alias. [Mon Feb 23 19:20:48 2015] [warn] The Alias directive in /etc/apache2/conf.d/roundcube.conf at line 4 will probably never match because it overlaps an earlier Alias. [Mon Feb 23 19:20:48 2015] [warn] The Alias directive in /etc/apache2/conf.d/roundcube.conf at line 5 will probably never match because it overlaps an earlier Alias. Loaded Modules: core_module (static) log_config_module (static) logio_module (static) version_module (static) mpm_prefork_module (static) http_module (static) so_module (static) actions_module (shared) alias_module (shared) auth_basic_module (shared) auth_digest_module (shared) authn_file_module (shared) authz_default_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgi_module (shared) dav_module (shared) dav_fs_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) fcgid_module (shared) include_module (shared) mime_module (shared) negotiation_module (shared) python_module (shared) reqtimeout_module (shared) rewrite_module (shared) ruby_module (shared) setenvif_module (shared) ssl_module (shared) status_module (shared) suexec_module (shared) suphp_module (shared) Syntax OK
[i]// ilin - scaliłem.
Na przyszłość proszę edytować swoje posty jak chcesz coś dodać i stosować znaczniki code.[/i]
Offline
Tam masz jakieś błędy w konfigu Roundcube (linie 3,4,5), poza tym niby w porządku.
Na liście modułów nie widać modułu PHP5, a trudno od Apacha wymagać, żeby działało PHP bez modułu PHP.
Masz zamiast niego jakiś moduł:
suphp_module (shared)
ale najwyraźniej nie działa, albo ma zrypaną konfigurację.
W logach na temat błędów nie ma ani słowa?
Czy może w [b]/var/log/apache2/[/b] nic nie ma?
Przy okazji, gorszego tutka nie dało się znaleźć?
Tam jest wszystko tak pomieszane, że aż dziwne, że w ogóle cokolwiek kiedyś działało.
Ostatnio edytowany przez Jacekalex (2015-02-23 19:37:12)
Offline
Sory za rozwlekłą pisownię piszę tu 1-szy raz a logi zaraz wyslę
Offline
Z logów to masz tylko wyciągnąć to, co dotyczy konkretnego błędu, komunikaty w logach są dosyć jednoznaczne.
Offline
to znalazłem w pliku /var/log/apache2/error.log
[Mon Feb 23 01:13:51 2015] [notice] Apache/2.2.22 (Debian) DAV/2 mod_fcgid/2.3.6 mod_python/3.3.1 Python/2.7.3 mod_ruby/1.2.6 Ruby/1.8.7(2012-02-08) mod_ssl/2.2.22 Ope$ PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/ming.ini on line 1 in Unknown on line 0 [Mon Feb 23 01:14:08 2015] [error] [client 83.24.196.223] File does not exist: /var/www/ispconfig/webmail [Mon Feb 23 01:14:09 2015] [error] [client 83.24.196.223] File does not exist: /var/www/ispconfig/webmail [Mon Feb 23 01:14:10 2015] [error] [client 83.24.196.223] File does not exist: /var/www/ispconfig/webmail [Mon Feb 23 01:14:11 2015] [error] [client 83.24.196.223] File does not exist: /var/www/ispconfig/webmail [Mon Feb 23 01:14:13 2015] [error] [client 83.24.196.223] File does not exist: /var/www/ispconfig/webmail [Mon Feb 23 01:14:16 2015] [error] [client 83.24.196.223] File does not exist: /var/www/ispconfig/webmail
[Mon Feb 23 01:14:56 2015] [notice] Apache/2.2.22 (Debian) DAV/2 mod_fcgid/2.3.6 mod_python/3.3.1 Python/2.7.3 mod_ruby/1.2.6 Ruby/1.8.7(2012-02-08) mod_ssl/2.2.22 Ope$ PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/ming.ini on line 1 in Unknown on line 0 PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/ming.ini on line 1 in Unknown on line 0 PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/ming.ini on line 1 in Unknown on line 0
Offline
Popraw błędy, które masz w konfigach PHP, te z komentarzami.
Zrób sobie też skrypta np [b]info.php[/b] o zawartości:
<?php phpinfo(); ?>
Zapisz go w głównym folderze Apacha, daj mu uprawnienia 755, i otwórz potem tego skrypta przez przeglądarkę, np:
http://adres-serwera/info.php
Powinna się wyświetlić konfiguracja PHP.
Ostatnio edytowany przez Jacekalex (2015-02-23 19:50:22)
Offline
a to sa te błędne linijki w rondcube:
Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/ Alias /roundcube /var/lib/roundcube Alias /webmail /var/lib/roundcube
Offline
To wygląda, że Aliansy nie działają.
PHP w ogóle działa, ten skrypt info.php wyświetla w przeglądarce konfigurację php?
Ostatnio edytowany przez Jacekalex (2015-02-23 20:29:18)
Offline
taksamo jest z aliasami do phpmyadmin, w poprzednio wysłanych plikach jest tez linijka z aliasem do phpmyadmin
Ostatnio edytowany przez erni83 (2015-02-23 19:56:47)
Offline
jeśli coś działało a nie działa to z reguły wina niezaładowanego modułu. ale przy tych szczątkowych informacjach nawet zajrzenie do /dev/glassorb nie pomaga:(
Offline
PHP, jak widzę, tam działa, tylko dziwny ten Server API CGI/FastCGI, ja na PHP_FPM mam: FPM/FastCGI, tylko że na Nginxie.
Dlaczego dyrektywa Alias nie bryka w Apache-2.22 pojęcia nie mam, powinna chodzić.
Wg dokumentacji, masz to niby poprawnie:
http://httpd.apache.org/docs/2.2/mod/mod_alias.html
W razie czego, jak bym w konfigach ROuncuba i PHPmyadmina zahashowal Aliansy, a dał tam zmienne DocumentRoot do odpowiednich folderów.
Offline
Ok spróbuje
Ostatnio edytowany przez erni83 (2015-02-23 20:11:36)
Offline
Time (s) | Query |
---|---|
0.00009 | SET CHARSET latin2 |
0.00004 | SET NAMES latin2 |
0.00094 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.221.52.77' WHERE u.id=1 |
0.00063 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.221.52.77', 1732809034) |
0.00057 | SELECT * FROM punbb_online WHERE logged<1732808734 |
0.00065 | DELETE FROM punbb_online WHERE ident='18.227.52.248' |
0.00068 | SELECT topic_id FROM punbb_posts WHERE id=283477 |
0.00005 | SELECT id FROM punbb_posts WHERE topic_id=27075 ORDER BY posted |
0.00082 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=27075 AND t.moved_to IS NULL |
0.00005 | SELECT search_for, replace_with FROM punbb_censoring |
0.00246 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=27075 ORDER BY p.id LIMIT 0,25 |
0.00092 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=27075 |
Total query time: 0.0079 s |