dongtiao2066 2018-06-12 15:54 采纳率: 0%
浏览 128
已采纳

我如何知道在Nginx上设置了什么服务器名称或Web地址

I am trying to setup LEMP (Linux, Nginx, MySQL, PHP) stack on my PC to use with Wordpress. I follow the instructions on this website. I see that the folder of wordpress in www folder was successfully extracted.

I can also verify that Nginx is running. However, I don't know how to get the wordpress index.php page on the browser.

enter image description here

On windows, I simply go to the browser and type localhost/webprojectfoldername or 127.0.0.1/webprojectfoldername

However, when I try to access the index.php of wordpress via localhost, I get the Apache page.

enter image description here

I would like to use Nginx as server but not Apache. I guess at this point, I don't know what servername or ipaddress to put on the browser to get to Nginx's page or Wordpress's index.php

I don't know how to identify the servername that was setup. On Windows, I simply use localhost or 127.0.0.1.

Any thoughts on how I identify it on Ubuntu?

I'd appreciate any help.

Thank you.

*** EDIT (Added Screenshot of Nginx configuration) ****

enter image description here

  • 写回答

1条回答 默认 最新

  • dqtm8504 2018-06-12 15:59
    关注

    Either:

    nginx is listening on a different port

    By default, HTTP works over port 80, but when you connect to that port you are reaching Apache.

    You need to find the port nginx is listening on (from the article you link to: listen 80 default_server; shows 80 but lets say it was 81) and connect to that instead: http://localhost:81/`

    nginx and apache are trying to listen on the same port and apache won

    You need to turn off Apache (and possibly restart nginx).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘