LinuxForum.Fans
Тема

Проблема с установкой php

Автор: Manul 28 сообщений 7656 просмотров
#231252
Ashotovich написал:
P.S. Как хорошо, что это - не канал об аниме.

Скажу больше: это не сайт программы «Ищу тебя!».
Сообщение ваше удаляю, на форуме есть возможность связаться с пользователем, используя систему личных сообщений и почтовую рассылку в профиле пользователя.

#232028

Случаной удалил каталог:

text
rm -rf /var/www

Потом создал его от рута

text
mkdir /var/www/
mkdir /var/www/localhost
mkdir /var/www/localhost/htdocs

После чего апач ругается:

text
/etc/init.d/apache2 start
 * Starting apache2 ...
Warning: DocumentRoot [/var/www/localhost/htdocs] does not exist
Warning: DocumentRoot [/var/www/localhost/htdocs] does not exist
text
ls -l /var/www/
drwxr-xr-x 4 root            root 4096 Фев 24 23:55 loacalhost
text

ls -l /var/www/loacalhost/
drwxr-xr-x 2 root   root   4096 Фев 24 23:55 cgi-bin
drwxr-xr-x 2 root   root   4096 Фев 24 23:55 htdocs
#232029
tyrnov написал:
Потом создал его от рута
text
mkdir /var/www/
mkdir /var/www/localhost
mkdir /var/www/localhost/htdocs

Можно было проще

text

mkdir -p /var/www/localhost/htdocs

Запустите

text
/etc/init.d/apache2 -d start

...и покажите вывод.

#232030

В порядке бреда — покажите вывод команды

text

grep hsqldb /etc/passwd
#232087
Показать
text
/etc/init.d/apache2 -d start
+ _conf_d=/etc/init.d/../conf.d
+ _c=apache2
+ '[' -n apache2 -a apache2 '!=' apache2 ']'
+ unset _c
+ sourcex -e /etc/init.d/../conf.d/apache2.default
+ '[' -e = -e ']'
+ shift
+ '[' -e /etc/init.d/../conf.d/apache2.default ']'
+ return 1
+ sourcex -e /etc/init.d/../conf.d/apache2
+ '[' -e = -e ']'
+ shift
+ '[' -e /etc/init.d/../conf.d/apache2 ']'
+ . /etc/init.d/../conf.d/apache2
++ APACHE2_OPTS='-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5'
+ unset _conf_d
+ sourcex -e /etc/rc.conf
+ '[' -e = -e ']'
+ shift
+ '[' -e /etc/rc.conf ']'
+ . /etc/rc.conf
++ unicode=YES
++ rc_tty_number=12
+ '[' -n '' ']'
+ sourcex /etc/init.d/apache2                                                                                                                                                                                                                
+ '[' /etc/init.d/apache2 = -e ']'
+ . /etc/init.d/apache2
++ extra_commands='configtest modules virtualhosts'
++ extra_started_commands='configdump fullstatus graceful gracefulstop reload'
++ description_configdump='Dumps the configuration of the runing apache server. Requires server-info to be enabled and www-client/lynx.'
++ description_configtest='Run syntax tests for configuration files.'
++ description_fullstatus='Gives the full status of the server. Requires lynx and server-status to be enabled.'
++ description_graceful='A graceful restart advises the children to exit after the current request and reloads the configuration.'
++ description_gracefulstop='A graceful stop advises the children to exit after the current request and stops the server.'
++ description_modules='Dump a list of loaded Static and Shared Modules.'
++ description_reload='Kills all children and reloads the configuration.'
++ description_virtualhosts='Show the settings as parsed from the config file (currently only shows the virtualhost settings).'
++ description_stop='Kills all children and stops the server.'
+ unset _d
+ unset _f
+ '[' -n start ']'
+ '[' start = depend ']'
+ for _cmd in describe start stop status '${extra_commands:-$opts}' '$extra_started_commands'
+ '[' describe = start ']'
+ for _cmd in describe start stop status '${extra_commands:-$opts}' '$extra_started_commands'
+ '[' start = start ']'
++ command -v start
+ '[' start = start ']'
+ yesno
+ '[' -z '' ']'
+ return 1
+ for _cmd in '$extra_started_commands'
+ '[' configdump = start ']'
+ for _cmd in '$extra_started_commands'
+ '[' fullstatus = start ']'
+ for _cmd in '$extra_started_commands'
+ '[' graceful = start ']'
+ for _cmd in '$extra_started_commands'
+ '[' gracefulstop = start ']'
+ for _cmd in '$extra_started_commands'
+ '[' reload = start ']'
+ unset _cmd
++ command -v start_pre
+ '[' '' = start_pre ']'
+ start
+ checkconfig
+ checkconfd
+ '[' '!' -f /etc/init.d/sysfs ']'
+ PIDFILE=/var/run/apache2.pid
+ TIMEOUT=15
+ SERVERROOT=/usr/lib64/apache2
+ '[' '!' -d /usr/lib64/apache2 ']'
+ CONFIGFILE=/etc/apache2/httpd.conf
+ '[' etc/apache2/httpd.conf = /etc/apache2/httpd.conf ']'
+ '[' '!' -r /etc/apache2/httpd.conf ']'
+ APACHE2_OPTS='-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -d /usr/lib64/apache2'
+ APACHE2_OPTS='-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -d /usr/lib64/apache2 -f /etc/apache2/httpd.conf'
+ '[' -n '' ']'
+ APACHE2=/usr/sbin/apache2
+ /usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -d /usr/lib64/apache2 -f /etc/apache2/httpd.conf -t
+ ret=0
+ '[' 0 -ne 0 ']'
+ return 0
+ ebegin 'Starting apache2'
 * Starting apache2 ...
+ start-stop-daemon --start -- /usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -d /usr/lib64/apache2 -f /etc/apache2/httpd.conf -k start
Warning: DocumentRoot [/var/www/localhost/htdocs] does not exist
Warning: DocumentRoot [/var/www/localhost/htdocs] does not exist
+ i=0
+ '[' '!' -e /var/run/apache2.pid ']'
+ '[' 0 -lt 15 ']'
+ sleep 1
++ expr 0 + 1
+ i=1
+ '[' '!' -e /var/run/apache2.pid ']'
+ '[' 1 -lt 15 ']'
+ sleep 1
++ expr 1 + 1
+ i=2
+ '[' '!' -e /var/run/apache2.pid ']'
++ test 2 -lt 15
+ eend                                                                                                                                                                                                                                 [ ok ]
++ command -v start_post
+ '[' '' = start_post ']'
+ shift
+ continue 2
+ '[' -n '' ']'

text
grep hsqldb /etc/passwd

Возвращает пустую строку

#232090
text
ls -l /var/www/loacalhost/ 

Вот тут в слове была просто опечатка. Поправил и стало все норм

#232101

Может кто знет как реализовать следующее:
На хостингах видел, что права на файлы и папки при заливке по FTP выставляются автоматически такие, какие надо.
Не кто не знает как это реализуется?

#232103

Тоже нашел сам как реализовать.
Если используете vsftpd, то в его конфиге размаскируем:

text
local_umask=022

Теперь при заливке через фтп, права на файлы будут 644, а на папки 755.

Войдите или зарегистрируйтесь, чтобы ответить.