- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
经过 10 多个小时的研究,我还没弄清楚为什么这不起作用!我正在尝试将本地主机移动到/etc/nginx/sites-enabled/default 中的启用站点的文件夹。
它是来自站点可用文件夹的符号链接(symbolic link)。使用以下配置时,使用 localhost:8080 作为我的地址,出现“无法连接”
nginx.conf(/usr/local/nginx/conf/nginx.conf):
user www-data;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/sites-enabled/*;
}
可用站点(/etc/nginx/sites-available/default):
server {
listen 8080;
root /home/myusername/myown/customdirectory;
index index.php index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ /index.html;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
如果我将可用站点的相关信息放入 nginx.conf,我就可以使其工作,我只是不明白为什么它不能以这种方式工作?
谢谢!
最佳答案
我也遇到了同样的问题。这是因为我不小心使用了带有符号链接(symbolic link)的相对路径。
您确定使用了完整路径吗,例如:
ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
关于Nginx 未在已启用站点中拾取站点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12715871/
@秋意正寒 先讲怎么用,再讲大致原理。 1 拾取坐标 > 仅拾取椭球体表面坐标 使用 Camera.prototype.pickEllipsoid 方法,接受一个必选的屏幕坐标,返回一个三维世界坐标
我知道 OpenGL 选择模式已被弃用,并且除了少数 SGI 盒和 3DLabs GPU 之外从未进行过硬件加速。但我无法摆脱它(不是我的代码)。在其 C++ 代码下方: void GLWidget:
我有一个 .ipa,里面有 arm64 和 armv7 个片段。如果我在同时支持 arm64 和 armv7 的 iDevice 上运行它,运行时将选择哪个切片? 我可以通过打印 NSLog 或某种方
我想在建模为高度图的世界地面上的 OpenGL 场景中跟踪鼠标坐标。目前没有像硬件镶嵌这样的花哨的东西。注意这个问题是不是 关于物体拾取。 目前我正在执行以下操作,由于回读操作,这显然会降低性能: 渲
我正在将一个数组从 php 传递到 javascript,但它似乎在数组的开头和结尾处拾取了一个额外的“。 我的数组从 PHP 文件发送 json_encode($CheckItems."|".$Ch
我的光线拾取代码有问题。我的代码 我正在使用此代码进行选择计算: /*----------------------------------------------------------- Funct
我需要根据特定深度(用于光线转换)将 2D 鼠标坐标转换为 3D 世界坐标。我没有直接在 C++ 中使用 DirectX,我使用的是专有语言,但如果你用 C++ 或伪代码(首选 C++)给我一个答案,
我正在开发一款等距游戏,但在制定方 block 选择算法时遇到了问题。 这就是我渲染等距 map 的方式: for (int x = 0; x < 50; x++) { for (int y
我尝试在应用程序中导出 UTI,但 macOS (10.3.2) 未拾取它。我已经在一个较小的项目中复制了我的问题。这是 info.plist 的相关部分: UTExportedTypeDeclara
我正在尝试使用 Pyglet 的 OpenGL 包装器实现拾取,但我在转换 C tutorial 时遇到了问题到 Python。具体在下面的部分。 #define BUFSIZE 512GLuint
我有一个定义为 singleTop 的 Activity,因此只有一个实例存在。 我用一些数据设置了一个 Notification Intent,并将其包含在 PendingIntent 中,
场景中有一些物体,有些可能会遮挡其他物体。当我单击鼠标或拖动选择以获得选择矩形时,我只想选择/拾取从这个角度可以看到的对象。应用程序当前使用 GL_SELECT 渲染模式,但正如我们所知,这也会选择被
我在一个小项目中使用了SpringBootApplication。架构很简单: 入口文件: @SpringBootApplication @PropertySource("classpath:appl
我有以下媒体查询,以选择 iPad 视网膜和更小的显示器。 @media only screen and (min-device-width : 768px) and (max-device-widt
我需要将 Oauth 设置为我将要处理的 PHP 项目的一部分。 为此我跑了; sudo pecl install oauth 这完成了 OK,它指示我将 extension=oauth.so 添加到
我正在尝试使用 Angular4 和 Google Analytics 集成自定义维度。我看过类似的主题,但没有任何内容可以准确解决这个问题。 在 GA 中我设置了自定义维度: 它以索引 1 显示:
我试图阻止用户与 vtkCaptionWidget 中的 anchor 进行交互 (http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/CaptionWi
我找不到使用光线追踪方法在 3D 中拾取的正确且可理解的表达方式。有人用任何语言实现过这个算法吗?分享直接工作的代码,因为由于伪代码无法编译,所以它们通常是由缺少的部分编写的。 最佳答案 您所拥有的是
我有一个相对较新的 MVC5 项目,正在使用 TeamCity 构建并由 Octopus Deploy 部署。一切都很棒,直到我通过 NuGet 添加 SQLite。当项目构建完成后,我在 bin 目
我正在尝试使用 Spring Data REST(版本 2.3.0.RELEASE)进行预测。我读了reference documentation ,并收集到这些是我需要的部分: JPA 实体 @En
我是一名优秀的程序员,十分优秀!