2024年09月28日 mac笔记本运行npm install报错gyp ERR! configure error错误是什么原因,下面web建站小编给大家详细介绍一下! 错误提示: gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/var/www/project_name/node_modules/node-sass/build' gyp ERR! System Linux 4

2024年09月28日 问题描述:vue项目运行报Module build failed: Error: No PostCSS Config错误,应该是文件没找到,但是文件是确实存在的!下面web建站小编带大家一起解决一下! 解决方法: 1、在根目录找一下postcss.config.js文件,如果没有就新建一个。 2、在文件中写入一下代码: module.exports = { plugins: { 'autoprefixer': {browsers: 'last 5 version'}

2024年09月28日 vue因为空格报错是什么原因,如何解决?下面web建站小编给大家简单介绍一下! 解决方法: 1、找到目录build下的webpack.base.conf.js文件,把其中的rules注销掉; 2、重新执行“npm run dev”; 3、打开test目录下的.eslintrc.js文件,添加自定义规则; 4、打开rules,手动添加“no-mixed-spaces-and-tabs”,然后定义为0,关闭规则即可。 代码如下: // 在这里添加自定义规则 'rules':

2024年09月28日 js如何实现对右键功能进行屏蔽(禁止右键)点击事件,下面web建站小编给大家详细介绍一下具体代码! 具体代码如下: var h = window.innerHeight,w=window.innerWidth; //禁用右键 window.oncontextmenu=function(){return false;} //任何键盘敲击事件都是无效操作 window.onkeydown = window.onkeyup = window.onkeypress

2024年09月28日 nginx搭建vue项目后,强制刷新页面出现404是什么原因?下面web建站小编给大家分析一下! 原因分析: url地址是虚拟的,不是真实存在的,包括页面也是js控制,所以刷新就找不到文件而报404。 解决方法: 在server配置文件内 后面中加上: location / { try_files $uri $uri/ @router; index index.html; } location @router { re

2024年09月28日 http { include mime.types; default_type application/octet-stream; server { //代理跳转的网站 listen 9095; server_name localhost 192.168.0.91; //当前项目网址 location /wap/ {

2024年09月27日 下面web建站小编给大家介绍一下关于Access-Control-Allow-Origin跨域问题! 1、允许所有域名访问 add_header Access-Control-Allow-Origin *; 2、允许指定域名访问 add_header Access-Control-Allow-Origin https://lmcjl.com; 3、允许多个指定域名访问 set $cors_origin ""; if ($http_origin ~* "^htt

2024年09月27日 nginx无法启动php如何解决?下面web建站小编给大家简单介绍一下解决方法! 解决方法如下: 找到nginx配制文件位置是/etc/nginx/sites-available/default location ~ \.php$ { root /var/www/html; include snippets/fastcgi-php.conf; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $

2024年09月27日 nginx设置禁止访问php的方法?下面web建站小编带大家了解一下实现方法! 配置nginx,禁止解析指定目录下的指定程序 server { listen 80; server_name www.dmtest.com; location / { root html; index index.php index.html index.htm; } location ~ ^/images/.*\.

2024年09月27日 vue项目部署成功后刷新页面报404是什么原因,原因是路由mode改成了history导致的,​下面web建站小编给大家介绍一下解决方法! 解决方法一:修改路由默认模式 const router = new VueRouter({ mode: "hash", base: process.env.BASE_URL, routes }); //链接会出现# 解决方法二:nginx修改 location / { root ... ind

2024年09月27日 nginx根据扩展名限制程序和文件访问禁止访问php?下面web建站小编给大家详细介绍一下具体代码! nginx配置如下: server { listen 80; server_name www.lmcjl.com; location / { root html; index index.php index.html index.htm; } location ~

2024年09月27日 nginx如何禁止访问指定目录下的所有文件和目录,下面web建站小编给大家详细介绍一下具体实现代码! nginx配置如下: server { listen 80; server_name www.lmcjl.com; location / { root html; index index.php index.html index.htm; } //禁止访问单个

2024年09月27日 nginx如何限制网站来源ip访问,下面web建站小编给大家详细介绍一下实现代码! nginx配置如下: server { listen 80; server_name www.lmcjl.com; location / { root html; index index.php index.html index.htm; } //限制ip访问 location

2024年09月27日 阿里云对象存储oss本身也可以用HTTPS直接访问,下面给大家简单介绍一下如果我们想使用我们自己的域名和HTTPS加密,我们如何才能实现,防止域名被钓鱼劫持和篡改? 域名解析: 1、oss本身域名: http://lmcjl.com​ 2、自定义的域名: https://image.myname.com 首先我们将 image.myname.com 解析到一个有公网ip阿里云ECS服务器上,阿里云上提供域名解析的服务。 nginx重定向设置: //vim oss.conf

2024年09月27日 wordpress如何实现nginx多站点rewrite重写规则,下面web建站小编给大家详细介绍一下具体实现方法! wordpress实现多站点子目录重写规则 map $uri $blogname{ ~^(?P/[^/]+/)files/(.*) $blogpath ; } map $blogname $blogid{ default -999; #Ref: http://wordpress.org/extend/plugins/nginx

最新内容