Now has been in the local debugging success, how to let million network virtual host to find laravel of the portal file, WAN network of virtual host seems to be unable to configure Apache server. To find a solution.
Reply content:
Give it up. Yes, change it. laravel file directory structure, for the application to choose the low-level encryption method, you can successfully run on the WAN Cloud virtual host.
Take laravel5.1 to say:
-
Create a local folder under the root directory and copy all files and folders except the public folder in the root directory to the local folder
-
Then copy all the files under the public folder to the Web site root, and then delete the public folder so that the portal becomes the root directory instead of the public
-
Opens the index.php under the root directory (previously/public/ index.php)
require __dir__. ' /.. /bootstrap/autoload.php ';
Modify to
Require __dir__. ' /local/bootstrap/autoload.php ';
Will
$app = require_once __dir__. ' /.. /bootstrap/app.php ';
Modify to
$app = require_once __dir__. ' /local/bootstrap/app.php ';
-
Open/local/config/app.php (previous/config/app.php)
will
' key ' = env (' App_key ', ' somerandomstring '),
' cipher ' = ' AES-256-CBC ',
Instead of
' key ' = env (' App_key ', ' 1234567890qwerty '),
' cipher ' = > ' AES-128-CBC ',
Where key uses a random string of length 16, because the WAN does not support ' AES-256-CBC ' so 128-bit encryption is possible, 128 with 16 random string to do key,256 with 32.
-
Uploaded to the million-net virtual host, and then back to the background to change the PHP version to 5.5, and the successful operation of the Laravel.
I later still used the Digitalocean VPS, very good under the Htdocs add a. Htaccess redirects to the public directory and then the PHP version to 5.6. Later I still use the VPS Orz to buy cloud server ECS AH now also use virtual host? The price is almost why not buy the host???? Give it up.