我想在单个 nginx 服务器中为多个 Laravel 应用程序提供服务,第一个在 中具有根目录/var/www/html/app1,第二个在 中具有根目录/var/www/html/app2,依此类推。index.php每个应用程序的文件都在一个名为/public.
每当用户调用 时http://www.mywebsite.com/app1,nginx 应该返回 app1,如果用户调用http://www.mywebsite.com/app2,nginx 应该返回 app2。
我当前的 nginxconf文件如下:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location /app1 {
root /var/www/html/app1/public;
index index.php;
}
location /app2 {
root /var/www/html/app2/public;
index index.php;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back …Run Code Online (Sandbox Code Playgroud) 我收到此错误:
错误 1264 (22003):第 1 行的“median_comments”列的值超出范围
运行此查询后:
update influencers set `median_comments` = 1347 WHERE `id` = 1;
Run Code Online (Sandbox Code Playgroud)
我不知道为什么在这个没有任何小数且只有 4 位数字的数字上失败。
字段类型为:
median_comments decimal(10,8)
Run Code Online (Sandbox Code Playgroud) 我需要有关 mysql 查询的帮助,以下是详细信息:
三张表,相册_大师,相册_照片_地图,照片_详细信息
相册_主表结构
album_id(P) | album_name | user_id(F)
1 abc 1
2 xyz 1
3 pqr 1
4 e3e 2
Run Code Online (Sandbox Code Playgroud)
相册_照片_地图表结构
auto_id(P) | album_id(F) | photo_id
1 1 123
2 1 124
3 2 123
4 2 125
5 1 127
6 3 127
Run Code Online (Sandbox Code Playgroud)
Photo_Details 表结构
auto_id(P) | image_id(F) | image_url
1 123 http....
2 124 http....
3 125 http...
Run Code Online (Sandbox Code Playgroud)
我想编写一个查询来获取带有 user_id 1 的图像 url 的专辑名称 我在这里期望的输出是
album_id | album_name | image_url
1 abc http.. (either 123 or …Run Code Online (Sandbox Code Playgroud) 我的服务器计算机上有两个不同的 Laravel 应用程序。
他们位于:
D:/APPLICATION/application1
和
D:/APPLICATION/application2
以下是我的nginx.conf内容:
server {
listen 80;
server_name localhost;
location / {
root "D:/APPLICATION/application1/public";
try_files $uri $uri/ /index.php?$query_string;
index index.php index.html index.htm;
location ~ \.php$ {
try_files $uri /index.php = 404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
location ^~ /application2 {
alias "D:/APPLICATION/application2/public";
try_files $uri $uri/ /index.php?$query_string;
index index.php index.html index.htm;
location ~ \.php$ {
try_files $uri /index.php = 404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include …Run Code Online (Sandbox Code Playgroud)