默认情况下,访问XAMPP只能在本机进行访问,即只能访问http://localhost地址。
如果需要在外部机器访问XAMPP,则需要修改配置。修改步骤如下:
1、停止lampp
#/opt/lampp/lampp stop
2、修改/opt/lampp/etc/extral/httpd-xampp.conf
注释掉Deny from,allow这一行
#
# New XAMPP security concept
#
Order deny,allow
# Deny from all
Allow from ::1 127.0.0.0/8
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
3、启动lampp
#/opt/lampp/lampp start
由于此版本不一样。
修改如下:
LoadModule perl_module modules/mod_perl.so Alias /phpmyadmin "/opt/lampp/phpmyadmin" Alias /phpsqliteadmin "/opt/lampp/phpsqliteadmin" # since XAMPP 1.4.3 <Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit # Require local Require all granted Order allow,deny Allow from all # ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory> <Directory "/opt/lampp/phpsqliteadmin"> AllowOverride AuthConfig Limit # Require local Require all granted Order allow,deny Allow from all # ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory> # since LAMPP 1.0RC1 AddType application/x-httpd-php .php .php3 .php4 XBitHack on # since 0.9.8 we’ve mod_perl <IfModule mod_perl.c> AddHandler perl-script .pl PerlHandler ModPerl::PerlRunPrefork PerlOptions +ParseHeaders PerlSendHeader On </IfModule>
然后自然是重启。可以正常访问了。
由于是内网,这样无所谓。