laravel 配置站点域名
访问一直报404错误
laravel端:
default.conf
server {
listen 80;
server_name api.xxxx.com;
index index.html index.htm index.php;
root /alidata/www/default/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
include /alidata/server/nginx/conf/rewrite/default.conf;
access_log /alidata/log/nginx/access/default.log;
}
web端:
website.conf
server {
listen 80;
server_name www.xxxx.com;
index index.html index.htm;
root /alidata/www/web;
location / {
root /alidata/www/web;
index index.html index.htm;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
#include /alidata/server/nginx/conf/rewrite/default.conf;
access_log /alidata/log/nginx/access/website.log;
}
https-website.conf:
server {
listen 443;
server_name www.xxx.com;
ssl on;
index index.html index.htm;
root /alidata/www/web;
ssl_certificate /alidata/server/nginx/conf/cert/214463173180944.pem;
ssl_certificate_key /alidata/server/nginx/conf/cert/214463173180944.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
root /alidata/www/web;
index index.html index.htm;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
#include /alidata/server/nginx/conf/rewrite/default.conf;
access_log /alidata/log/nginx/access/default.log;
}
https-default.conf:
server {
listen 443;
server_name api.ecaidata.com superman.ecaidata.com ;
ssl on;
index index.html index.htm index.php;
root /alidata/www/default/public;
ssl_certificate /alidata/server/nginx/conf/cert/214463173180944.pem;
ssl_certificate_key /alidata/server/nginx/conf/cert/214463173180944.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
include /alidata/server/nginx/conf/rewrite/default.conf;
access_log /alidata/log/nginx/access/default.log;
}
laravel 配置站点域名的更多相关文章
- phpcms站点域名配置https无法提交如何处理
一位网友给ytkah反映说phpcms站点域名配置https无法提交,在后台修改站点域名为https提交后提示“站点域名格式应该为http://www.phpcms.cn/,请以‘/’结束”,这个要如 ...
- 【Azure 环境】基于Azure搭建企业级内部站点, 配置私有域名访问的详细教程 (含演示动画)
前言 在Azure中,可以通过App Service快速部署,构建自定义站点(PaaS服务).默认情况下,这些站点被访问URL都是面向公网,通过公网进行解析.为了最好的安全保障,是否可以有一种功能实现 ...
- laravel 配置了自己的域名以后, localhost 无法访问 404 not found 的解决方法
这是后盾网视频教程的方法,应该是配置虚拟主机,此方法要改动,apache服务器里的conf文件夹里的httpd.conf文件 和conf/extral里面的httpd-vhost文件 具体改动为,co ...
- Nginx配置同一个域名同时支持http与https两种方式访问
Nginx配置同一个域名http与https两种方式都可访问,证书是阿里云上免费申请的 server{listen 80;listen 443 ssl;ssl on;server_name 域名;in ...
- nginx配置基于域名、端口、IP的虚拟主机
1.基于域名的虚拟主机: 绝大多数企业对外提供服务的网站使用的都是基于域名的主机,通过不同的域名区分不同的虚拟主机. 首先我们进入安装nginxd的目录下:/application/nginx-1.6 ...
- phpStudy配置站点 解决You don't have permission to access / on this server
1.配置站点:打开phpStudy->其他选项菜单->站点域名管理 2.配置站点:打开phpStudy->其他选项菜单->打开hosts 3.在apache的配置文件vhost ...
- Phpstudy2018 集成环境配置虚拟域名访问到Index Of 下
(1) Phpstudy是一款php集成开发环境 可随意切换Php的版本以及服务器. Phpstudy的网站根目录默认为WWW目录,那么如果我们想通过虚拟域名访问到Index Of目录来便于查看 ...
- 详细讲解:通过phpstudy 设置站点域名、站点域名管理
我们在本地编程的时候,会遇到路径特别长的情况,这样子我们在url中的输入就会变得不方便而且容易报错,那么在phpstudy这个环境中,有一个很好的功能,就是“站点域名管理”,他能让我们的url网址大大 ...
- apache配置多域名二级域名
nginx配置多域名泛解析的看这个链接:https://www.cnblogs.com/Crazy-Liu/p/10879740.html 下面直接来操作: [root@localhost ~]# f ...
随机推荐
- Hive 特性及原理
特点:Hive是构建在hadoop之上的数据仓库.数据存储在hdfs上,数据计算用的mapreduce框架.用户无需掌握MR的编写,通过类SQL语句即可自动生成查询计划. 主要内容: 接入入口 ...
- 一步一步学Silverlight 2系列(28):图片处理
概述 Silverlight 2 Beta 1版本发布了,无论从Runtime还是Tools都给我们带来了很多的惊喜,如支持框架语言Visual Basic, Visual C#, IronRuby, ...
- [Selenium] IOS 之 appium
从 Selenium 的官方文档来看,推荐用户使用 ios-driver 或 appium 而不是官方发布的 iPone Driver. 他们的地址分别是: http://ios-driver.git ...
- 【前端】CentOS 7 系列教程之五: 安装最新版 nginx 并转发 node 服务
转载请注明出处:http://www.cnblogs.com/shamoyuu/p/linux_5.html 进入/usr/local目录 cd /usr/local 下载最新版的ngxin压缩包 w ...
- CoreOS,CoreOS,一款 Linux 容器发行版
CoreOS,一款最新的 Linux 发行版本,支持自动升级内核软件,提供各集群间配置的完全控制. 关于使用哪个版本的 Linux 服务器系统的争论,常常是以这样的话题开始的: 你是喜欢基于 Red ...
- ASP.NET Core:创建一个Core项目
ylbtech-ASP.NET Core:创建一个Core项目 1.返回顶部 1. 2. 3. 4. 5. 2.返回顶部 1.新建Razor页面 2. 3. 4.Abc 4.1.Abc ...
- liist不同遍历优缺点
JAVA中循环删除list中元素的方法总结 印象中循环删除list中的元素使用for循环的方式是有问题的,但是可以使用增强的for循环,然后今天在使用时发现报错了,然后去科普了一下,再然后发现这是一个 ...
- Java的四大基础特性
Java的四大基础特性 一.抽象 父类为子类提供一些属性和行为,子类根据业务需求实现具体的行为. 抽象类使用abstract进行修饰,子类要实现所有的父类抽象方法否则子类也是抽象类. 二.封装 把对象 ...
- 关于cout输出精度问题
#include <iostream.h> #include <iomanip.h> void main(void) { cout.setf(ios::fixed); cout ...
- ASP.NET Core MVC 2.x 全面教程_ASP.NET Core MVC 06. Controller 返回View
Controller父类会提供很多上下文的相关信息,还提供了很多封装的方法 返回的对象要求实现了IActionResult接口 继承父类,并引入命名空间 写this点就出现很多东西,这些就是上下文的信 ...