每日一句 ( 2024920 )  

Years may wrinkle the skin, but to give up enthusiasm wrinkles the soul.

歲月留痕,只及肌膚;激情不再,皺起心靈。———— Samuel Ullman

在Nginx中將http://zh30.com:443跳轉(zhuǎn)到https://zh30.com:443

有小伙伴反應(yīng)我博客半年沒更新了,借此機(jī)會趕緊水一篇。另有小伙伴求助于我一個(gè)這樣的問題,說在使用http://協(xié)議外加443端口訪問時(shí),nginx會報(bào)錯(cuò)提示:“400 Bad Request The plain HTTP request was sent to HTTPS port”這個(gè)錯(cuò)誤是指請求錯(cuò)誤,http協(xié)議的請求被發(fā)送到了https的端口。在Nginx中,不能在一個(gè)端口同時(shí)處理http和https請求。按正常瀏覽來說也不可能會...

Laravel5.4安裝passport時(shí)遇到的一些問題

安裝時(shí)可能不支持高版本,我使用了composer require laravel/passport ~4.0安裝后執(zhí)行遷移時(shí)nothing to migrate,需要手動(dòng)注冊Provider, 在config/app.php中providers中添加Laravel\Passport\PassportServiceProvider::class。執(zhí)行php artisan passport:install時(shí)提示“There are no commands defined in the “passport” namespace.” 需要執(zhí)行cache:clear和config:cache 更新緩存。...

Vue history模式編譯后nginx無法訪問的問題

Vue的項(xiàng)目,使用history路由模式相比hash模式來說,url會比較美觀。但新手在把項(xiàng)目編譯后并使用nginx配置訪問時(shí),點(diǎn)擊其它頁時(shí)會空白,F(xiàn)12查看請求,返回304,并且提示“We’re sorry but xxxxxx doesn’t work properly without JavaScript enabled. Please enable it to continue。我解決的方法是首先在nginx里要正確配置好了urlrewrite:location / { try_files $uri $uri/ /in...

亂碼表,看懂常見編碼亂碼

亂碼,是最常遇到的問題,這個(gè)表貌似可以輕松的通過“亂碼”的樣子明白亂碼原因。好吧,我承認(rèn)這是又水了一篇。。。。

寫了一個(gè)在Safari中圖片熱點(diǎn)map無效的bug

是今天在寫一個(gè)通過js向頁面上的圖片添加map熱點(diǎn)的功能時(shí),遇到的bug。生成的圖片熱點(diǎn)在我本地windows和android設(shè)備上均正常使用,map中設(shè)置的熱點(diǎn)可以正常點(diǎn)擊,但在iphone上沒有任何效果。一直以為是safari兼容問題,google也搜了不少文章,都沒有找到相關(guān)的說明。直到晚上再打開電腦比對我的代碼和w3school上的示例時(shí)才發(fā)現(xiàn),img標(biāo)簽中的usemap中沒有加#。。。。這種操作居然也可以? 沒加...

vagrant+ubuntu14.4+lnmp一鍵包運(yùn)行l(wèi)aravel可能需要的步驟

1. vagrant init原版ubuntu trusty環(huán)境,可能需要先離線下載安裝box2. 編輯Vagrantfile文件,取消注釋config.vm.network項(xiàng),自定義ip。編輯底部config.vm.provision項(xiàng),增加幾條shell。config.vm.provision "shell", path: "sources-list.sh"config.vm.provision "shell", inline: "apt-get update"config.vm.provision "shell", inline: "wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar....

mysql允許遠(yuǎn)程訪問設(shè)置

mysql默認(rèn)只允許本機(jī)訪問,需要遠(yuǎn)程登錄操作時(shí)需要增加%的權(quán)限本機(jī)登錄mysql -uroot -p之后:1.grant all privileges on *.* to root@'%' identified by "root";2.flush privileges; 這步可以不用?exit退出mysql3.修改my.conf 注釋bind-address一行vim /etc/mysql/my.conf [mysqld].... #bind-address = 127.0.0.1...安裝的lnmp集成環(huán)境中,mysql端口默認(rèn)被iptables禁用,需要...