Đây là lệnh mà myhanh đã gợi ý và kết quả trả v:
Code:
root@td-lt-it08:/home/trunglt# ifup lo
ifup: interface lo already configured
Đây là thông tin trong file /etc/apache2/httpd.conf
Code:
ServerName localhost
Listen 80
Đây là file thông tin /etc/apache2/ports.conf
Code:
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
NameVirtualHost *:80
# Listen 80
Listen 127.0.0.1:80
<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443
</IfModule>
Đây là thông tin trong file /etc/apache2/apache2.conf
Code:
#
ServerRoot "/etc/apache2"
#
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 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>
# These need to be set in /etc/apache2/envvars
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 module configuration (luu cau hinh cac module duoc nap):
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
# Include all the user configurations (luu cau hinh bo sung):
Include /etc/apache2/httpd.conf
# Include ports listing (lu cau hinh ve cong giao tiep)
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
# Include generic snippets of statements
Include /etc/apache2/conf.d/
# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
# Include the phpmyadmin:
Include /etc/phpmyadmin/apache.conf
Đây là thông tin trong file /etc/apache2/sites-enabled/000-default
Code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/Joomla158
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/Joomla158>
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>
</VirtualHost>
Nhưng hiện giờ vẫn không họat động đuợc localhost nếu không có NET. Mình cần phải bổ sung, sửa gì các files trên hay bạn có cần thêm thông tin file gì nữa không, mình sẽ gởi tiếp.
Cảm ơn bạn trước.