我只是安装 Xampp 但也许我错过了某个地方,因为我无法加载任何 Xampp GUI。此外,浏览器不工作本地主机 URL。
谢谢
我写了一个python脚本来监听2626端口并执行脚本。
本地主机正在监听的证明
tcp 0 0 127.0.0.1:2626 0.0.0.0:* LISTEN
Run Code Online (Sandbox Code Playgroud)
我可以使用以下命令通过 telnet 连接到本地主机上的这个端口:
:~$ telnet localhost 2626
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试从远程机器连接时,连接被拒绝。
:~$ telnet 128.251.xxx.xxx 2626
Trying 128.251.xxx.xxx...
telnet: Unable to connect to remote host: Connection refused
Run Code Online (Sandbox Code Playgroud)
我什至发出以下命令来接受端口 2626 上的流量:
sudo iptables -A INPUT -p tcp -i eth0 --dport 2626 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
端口 2626 上的 telnet 拒绝来自远程机器的连接的原因可能是什么,我该如何解决?
我想创建一个基于 Wordpress 的站点,该站点只能从我自己的机器(本地主机)访问。换句话说,我不希望我的计算机成为服务器。我只是希望它拥有网站所需的所有文件/var/www/,以便我以后可以将这些文件复制粘贴到另一台将成为服务器的机器上。
因此,我安装了 wordpress 包,我即将安装一个图形界面来管理文件。我该怎么办?我需要叫 LAMP 的东西吗?
我在 WordPress Answers 上看到过这个问题,但我想知道是否有人可以提供更特定于 Ubuntu 或更易于遵循的说明,尤其是如果它们与 Unity 界面相关。
我已经在本地计算机(ubuntu 14.04)上安装了 apache2。我可以使用我的网络 IP (xxx.xxx.xxx.xxx) 但不使用localhost或来看到此屏幕(“It Works!”屏幕) 127.0.0.1:
有人可以帮我吗?
编辑:
这是我的sudo gedit /etc/apache2/ports.conf文件。
我有 000-default 文件而不是 000-default.conf。这/etc/apache2/sites-enabled/000-default是。
hduser1@archit-HP-Notebook:~$ ssh localhost
/etc/ssh/ssh_config: line 11: Bad configuration option: hostkey
/etc/ssh/ssh_config: line 12: Bad configuration option: hostkey
/etc/ssh/ssh_config: line 13: Bad configuration option: hostkey
/etc/ssh/ssh_config: line 14: Bad configuration option: hostkey
/etc/ssh/ssh_config: line 16: Bad configuration option: useprivilegeseparation
/etc/ssh/ssh_config: line 19: Bad configuration option: keyregenerationinterval
/etc/ssh/ssh_config: line 20: Bad configuration option: serverkeybits
/etc/ssh/ssh_config: line 23: Bad configuration option: syslogfacility
/etc/ssh/ssh_config: line 27: Bad configuration option: logingracetime
/etc/ssh/ssh_config: line 28: Bad configuration option: permitrootlogin
/etc/ssh/ssh_config: line 29: Bad configuration option: strictmodes …Run Code Online (Sandbox Code Playgroud) 我目前正在为技术写作、大量统计/数学分析以及服务器端开发设置 Ubuntu 桌面设置,我想知道我是否应该只下载并安装 Apache、MySQL 和我所有的其他技术都作为本机包,或者如果使用 XAMPP 是个好主意。
我问的原因是因为虽然我习惯于在 Windows 系统上使用 XAMPP,但在 Cent OS 上进行服务器工作时,我一直只是将其设置为专用服务器机器。根据我的经验,我发现使用 Cent OS,与 XAMPP 相比,我不会受到配置的限制,XAMPP 似乎更像是“手持式”快速部署和测试套件。
但是使用 Ubuntu,因为我运行的是桌面版本(主要是因为我在运行 Ubuntu 网络服务器版本时有过糟糕的经历)我不确定我是否应该将 XAMPP 用于我的测试服务器,或者我是否可以本地安装所有东西我保持更多的控制。
非常感谢您提供任何见解,
我正在运行 localhost (Apache 2.4.6),但只有 localhost 可以index.php在 Web 浏览器中打开。子目录返回 403 Forbidden 错误。
现在,我根据这个答案添加了权限。作为参考,这些是权限:
sudo adduser <username> www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www
Run Code Online (Sandbox Code Playgroud)
因此,我放置网站所有内容的文件夹归www-data组所有。而且虽然我已经将自己添加到组中,但我无法打开文件夹!
(但子目录已可从 Web 浏览器访问。)
我的一部分 /etc/hosts
127.0.0.1 localhost
Run Code Online (Sandbox Code Playgroud)
当我 ping 127.7.7.7 时,它起作用了!
PING 127.7.7.7 (127.7.7.7) 56(84) bytes of data.
64 bytes from 127.7.7.7: icmp_seq=1 ttl=64 time=0.053 ms
64 bytes from 127.7.7.7: icmp_seq=2 ttl=64 time=0.050 ms
64 bytes from 127.7.7.7: icmp_seq=3 ttl=64 time=0.060 ms
Run Code Online (Sandbox Code Playgroud)
但是,ifconfig只显示127.0.0.1,未提及 127.0.0.0/8 子网中的其他地址。
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:19299 errors:0 dropped:0 overruns:0 frame:0
TX packets:19299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:1858607 (1.8 MB) …Run Code Online (Sandbox Code Playgroud) turtlebot@turtlebot-bot:~$ sudo apt-get update
Err:1 http://ports.ubuntu.com xenial InRelease Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
Err:2 http://ports.ubuntu.com xenial-updates InRelease Unable to connect to localhost:9999:
Err:3 http://ports.ubuntu.com xenial-security InRelease Unable to connect to localhost:9999:
Err:4 http://ports.ubuntu.com xenial-backports InRelease Unable to connect to localhost:9999:
Err:5 http://ppa.launchpad.net/flexiondotorg/minecraft/ubuntu xenial InRelease Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
Err:6 http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial InRelease Unable to connect to localhost:9999:
Err:7 http://packages.ros.org/ros/ubuntu xenial InRelease
Could not connect to localhost:9999 (127.0.0.1). …Run Code Online (Sandbox Code Playgroud) 真是愚蠢的问题,Ubuntu 20,我安装了 apache2,没有太多其他的。我想要sudo visudo /etc/hosts添加一个别名“dummy.com”域别名作为指向服务器的黑客,仅用于本地测试学习网站,我得到了这个不寻常的结果
>> /etc/hosts: syntax error near line 1 <<<
>>> /etc/hosts: syntax error near line 2 <<<
>>> /etc/hosts: syntax error near line 5 <<<
>>> /etc/hosts: syntax error near line 6 <<<
>>> /etc/hosts: syntax error near line 7 <<<
>>> /etc/hosts: syntax error near line 8 <<<
>>> /etc/hosts: syntax error near line 9 <<<
What now? Q
Run Code Online (Sandbox Code Playgroud)
我删除了该127.0.0.1 localhost notmydomain.com行,所以现在这是我的文件,为什么每当我编辑它时它都会出现如上所述的语法错误?
conrad@conrad-VirtualBox:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 conrad-VirtualBox
# The …Run Code Online (Sandbox Code Playgroud)