Имя: Пароль:
IT
 
Стартовая страница на Apach2.
0 antihacker
 
24.09.17
09:16
Всем привет! Установлен апачи2 на юбунту.
Чего только не делал, апачи ссылаться сюда на этот файл - /var/www/food/public_html/food-online/vendor/Application.php. А мне нужно запустить /phpmyadmin/setup/index.php что бы настроить админку для управления базами майсикл.

Вопрос тупой. Но я впервые работаю с апачи. Уж тем более с никс системой. Подскжаите куда копать
1 Cyberhawk
 
24.09.17
09:23
httpd.conf
2 VS-1976
 
24.09.17
09:24
Проверь что апачь работает ps ax | grep httpd
3 VS-1976
 
24.09.17
09:27
Тебе нужно настроить DocumentRoot в httpd.conf
4 antihacker
 
24.09.17
09:28
Вот эту байду - httpd.conf, ни где не нашел.
5 antihacker
 
24.09.17
09:28
где он должен сидеть
6 VS-1976
 
24.09.17
09:29
/etc/httpd
7 antihacker
 
24.09.17
09:34
Здесь приведены типичные места, где находится httpd.conf - конфигурационный файл веб-сервера Apache. Расположение конфигурационного файла httpd.conf зависит используемой операционной системы и версии Apache:

FreeBSD
apache 1.3
/usr/local/etc/apache/httpd.conf

apache 2.2
/usr/local/etc/apache22/httpd.conf

Linux
CentOS, Fedora (Redhat-системы)
/etc/httpd/conf/httpd.conf

Debian, Ubuntu
apache 1.3
/etc/apache/httpd.conf

apache 2.2
/etc/apache2/apache2.conf

/etc/apache2/envvars - здесь находятся переменные apache - имя пользователя и группы, от имени которых работает apache (APACHE_RUN_USER, APACHE_RUN_GROUP).

Gentoo
apache 2.0
/etc/apache2/httpd.conf
8 VS-1976
 
24.09.17
09:36
Когда исправишь DocumentRoot нужно будет перечитать параметры командой service httpd reload под пользователем root или через sudo service httpd reload с паролем от root или если твой пользователь включён в список имеющих права root-а тогда пароль от твоего пользователя.
9 VS-1976
 
24.09.17
09:37
А у тебя что за система? uname -a
10 antihacker
 
24.09.17
09:39
ЕСудья по Debian, Ubuntu
apache 1.3
/etc/apache/httpd.conf
apache 2.2
/etc/apache2/apache2.conf

файл /etc/apache2/apache2.conf существует.

Вот содержимое

#Include /etc/phpmyadmin/apache.conf
#Include /var/www/html/phpmyadmin/apache.conf

# 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.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian 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-enabled
#    |    `-- *.conf
#     `-- sites-enabled
#         `-- *.conf
#
#
# * 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.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, 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 and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * 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 Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>;);
# 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.
#
Mutex file:${APACHE_LOCK_DIR} default

#
# 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


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., http://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 severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.


<Directory />
        Options FollowSymLinks
        # AllowOverride None
        # Require all denied
        AllowOverride All
        Require all granted
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
         Options -Indexes
         Options FollowSymLinks
         AllowOverride All
         Require all granted
</Directory>

<Directory /var/www/.ssh/>
         AllowOverride None
         Require all denied
</Directory>

<Directory ~ "\.git">
        AllowOverride None
        Require all denied
</Directory>

<Directory ~ "\.svn">
    Order allow,deny
    Deny from all
</Directory>

#<Directory /srv/>
#    Options Indexes FollowSymLinks
#    AllowOverride None
#    Require all granted
#</Directory>




# 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.
#
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
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 README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Ноя не вижу ничего такого что указывал бы на стартовую страницу.
11 VS-1976
 
24.09.17
09:43
Смотри папку /var/www/
12 VS-1976
 
24.09.17
09:46
Это корень сайта. Туда скопируй папку phpmyadmin и запускай так [ip сервера]/phpmyadmin/setup/index.php
13 VS-1976
 
24.09.17
09:54
Копировать проще через mc если установлен
14 Asmody
 
24.09.17
09:55
(12) не давайте идиотских советов. в апаче сто лет как существуют алиасы.
15 Asmody
 
24.09.17
09:58
(10) как ты думаешь, за каким хером нужны первые две закомментированные строки?
16 VS-1976
 
24.09.17
10:02
(15) Человек впервые видит linux и apache а ты раздулся как индюк. Ты лучше напиши что ему делать а не соплями брызгай. И где ты там алиасы увидел?
17 antihacker
 
24.09.17
10:05
Ребята не надо ссориться из за каждого новичка. Их от этого не закончиться )))
18 VS-1976
 
24.09.17
10:06
Я ему просто пишу про то что критикуешь предлагай. А трындеть все могут
19 antihacker
 
24.09.17
10:10
И так я откомментил первые две строчки. Из за этого вроде он не мог обращаться в конфиг файл апачи.

Рестартанул /etc/init.d/apache2 и открываю https://46.36.216.17/phpmyadmin/setup/index.php

Все равно блин такая же картина.
20 antihacker
 
24.09.17
10:10
/etc/init.d/apache2 restart
21 antihacker
 
24.09.17
10:11
Кстати рестарт вызвал ошибку после этих строчек

/etc/apache2$ /etc/init.d/apache2 restart
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
Restarting apache2 (via systemctl): apache2.service failed!
22 VS-1976
 
24.09.17
10:14
значит комментируй эти 2 строки и перезапусти /etc/init.d/apache2 restart
23 VS-1976
 
24.09.17
10:15
в папке /var/www/html/phpmyadmin тоже лежит phpmyadmin?
24 antihacker
 
24.09.17
10:18
а он не должен лежать здесь /var/www/
25 antihacker
 
24.09.17
10:19
ладно положил
Блин где прописать что бы я мог запустить пхпмайадмин
26 VS-1976
 
24.09.17
10:20
Если тебе нужно что-то с таблицах поменять или качнуть данные проще скачать Adminer https://ru.wikipedia.org/wiki/Adminer. Он ничего не требует только запуск
27 antihacker
 
24.09.17
10:21
это как то попмжет ?
/$ uname -a
Linux food 2.6.32-042stab120.16 #1 SMP Tue Dec 13 20:58:28 MSK 2016 x86_64 GNU/Linux
28 VS-1976
 
24.09.17
10:23
(27) это чтобы понять какой линух но ты сам определился с папкой где лежит апач
29 VS-1976
 
24.09.17
10:25
Если закомментировал первые 2 строки попробуй перезапустить apache и проверить
https://46.36.216.17/phpmyadmin/setup/index.php
30 antihacker
 
24.09.17
10:28
пробовал уже все равно не перезапсукаеться
может сервер перезапустить
31 VS-1976
 
24.09.17
10:30
Ты 2 первых строки закомментировал?
32 antihacker
 
24.09.17
10:30
Админер тоже пробовал. Все равно он кидает на

Ошибка 404
Страница не найдена


Перейти на главную

Где этот обработчик сидит который не дает запустить другие приложения
33 antihacker
 
24.09.17
10:31
да закомментировал. Не перезапускаеться с ними и без них
34 VS-1976
 
24.09.17
10:31
Перезапуск сервера тебе ничего не даст
Закомментируй 2 строки первые
И перезапусти апач
35 VS-1976
 
24.09.17
10:32
Посмотри в папке ls -al /var/www/ есть ли там файл .htaccess
36 antihacker
 
24.09.17
10:36
/var/www

там только папки

food
html
wiki

Ты не мог бы через тимвивер подключмится?
37 VS-1976
 
24.09.17
10:36
ViSo76 скайп
38 antihacker
 
24.09.17
10:37
Пробовал так
39 antihacker
 
24.09.17
10:37
40 antihacker
 
24.09.17
10:37
SYSPATH/classes/Kohana/URL.php [ 112 ]
107                 }
108
109                 // Validate $host, see if it matches trusted hosts
110                 if ( ! static::is_trusted_host($host))
111                 {
112                     throw new Kohana_Exception(
113                         'Untrusted host :host. If you trust :host, add it to the trusted hosts in the `url` config file.',
114                         array(':host' => $host)
115                     );
116                 }
117             }
SYSPATH/classes/Kohana/URL.php [ 149 ] » Kohana_URL::base(arguments)
SYSPATH/classes/Kohana/Request.php [ 763 ] » Kohana_URL::site(arguments)
/var/www/food/public_html/food-online/vendor/food/views/helper/toolbar.php [ 8 ] » Kohana_Request->url(arguments)
SYSPATH/classes/Kohana/View.php [ 62 ] » include(arguments)
SYSPATH/classes/Kohana/View.php [ 359 ] » Kohana_View::capture(arguments)
/var/www/food/public_html/food-online/vendor/cms/system/classes/CMS/View.php [ 98 ] » Kohana_View->render(arguments)
/var/www/food/public_html/food-online/vendor/cms/system/classes/CMS/View/Helper.php [ 30 ] » CMS_View->render(arguments)
SYSPATH/classes/Kohana/View.php [ 236 ] » CMS_View_Helper->render()
APPPATH/views/layout/main.php [ 163 ] » Kohana_View->__toString()
SYSPATH/classes/Kohana/View.php [ 62 ] » include(arguments)
SYSPATH/classes/Kohana/View.php [ 359 ] » Kohana_View::capture(arguments)
/var/www/food/public_html/food-online/vendor/cms/system/classes/CMS/View.php [ 98 ] » Kohana_View->render(arguments)
/var/www/food/public_html/food-online/vendor/cms/system/classes/CMS/View/Layout.php [ 151 ] » CMS_View->render(arguments)
/var/www/food/public_html/food-online/vendor/cms/system/classes/CMS/Controller.php [ 101 ] » CMS_View_Layout->render()
SYSPATH/classes/Kohana/Controller.php [ 87 ] » CMS_Controller->after()
{PHP internal call} » Kohana_Controller->execute()
SYSPATH/classes/Kohana/Request/Client/Internal.php [ 97 ] » ReflectionMethod->invoke(arguments)
SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request(arguments)
109         $orig_response = $response = Response::factory(array('_protocol' => $request->protocol()));
110
111         if (($cache = $this->cache()) instanceof HTTP_Cache)
112             return $cache->execute($this, $request, $response);
113
114         $response = $this->execute_request($request, $response);
115
116         // Execute response callbacks
117         foreach ($this->header_callbacks() as $header => $callback)
118         {
119             if ($response->headers($header))
SYSPATH/classes/Kohana/Request.php [ 997 ] » Kohana_Request_Client->execute(arguments)
DOCROOT/public/index.php [ 6 ] » Kohana_Request->execute()