UserDir public_html이라는 곳은 없는듯 하네요. 추가 하라는 말씀인가요?
UserDir ~추가후 재시작시 에러 입니다.
- Restarting web server apache2
- We failed to correctly shutdown apache, so we’re now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you’d expect now!
… waiting Syntax error on line 292 of /etc/apache2/apache2.conf:
Invalid command ‘UserDir’, perhaps misspelled or defined by a module not included in the server configuration
…fail!
root@sulpn:/etc/apache2#
해당 아이디의 아래에 public_html폴더 만들고 권한을 chmod a+x 로 주고 그아래에 index.html파일 만들어줬습니다.
지금현재 설정은 apache2.conf파일은 기본 설정, 버추어호스트 설정 역시 초기 설정으로 변경하였습니다.
말씀하신 DocumentRoot 도 /var/www로 변경했습니다.
저장하고 다시 들어가 보면
’ 페이지를 찾을 수 없습니다. ’
검색 중인 페이지가 제거되었거나 이름이 변경되었거나 일시적으로 사용할 수 없습니다.
다음을 시도해 보십시오.
페이지 주소를 주소 표시줄에 입력한 경우 해당 주소를 올바르게 입력했는지 확인하십시오.
홈 페이지를 열고 원하는 정보가 있는 링크를 검색하십시오.
Click the 뒤로단추를 클릭하여 다른 링크를 시도하십시오.
인터넷에서 정보를 찾으려면 검색을 클릭하십시오.
HTTP 404 - 파일을 찾을 수 없음
Internet Explorer
이렇게 나옵니다.
이거 왜 안될까요… phpmyadmin 설치했는데 상관은 없겠죠?
참고로 설정부분 올립니다.
<VirtualHost *:80>
ServerAdmin webmasger@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
==================================================================
apache.conf 설정 파일
ServerRoot "/etc/apache2"
ServerAdmin webmaster@localhost
DocumentRoot "/var/www"
LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/.load
Include /etc/apache2/mods-enabled/.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%v:%p %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" vhost_combined
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
Include /etc/apache2/conf.d/
Include the virtual host configurations:
Include /etc/apache2/sites-enabled/