Tìm kiếm
Chỉ tìm trong tiêu đề
Bởi:
Chỉ tìm trong tiêu đề
Bởi:
Home
Trang nhất
Bài mới
Tìm trong diễn đàn
Có gì mới
Bài mới
Bài viết mới trong hồ sơ
Hoạt động gần đây
Thành viên
Người đang truy cập
Bài viết mới trong hồ sơ
Tìm trong bài viết hồ sơ
Thiết kế web
Chat
0
Archive
Top chatters
Sanctions
Đăng nhập
Tạo tài khoản
Tìm kiếm
Chỉ tìm trong tiêu đề
Bởi:
Chỉ tìm trong tiêu đề
Bởi:
Trình đơn
Install the app
Install
Trả lời vào chủ đề
Home
Trang nhất
Design & Seo website
PHP & MySQL
SQL
[Docker] How use Laradock for any project web (Laravel, wordpress, php, anymore)?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Nội dung
<blockquote data-quote="administrator" data-source="post: 45" data-attributes="member: 1"><p>Video: [MEDIA=youtube]PI28DiNwbj4:240[/MEDIA]</p><p>1. Pull Laradock: <a href="https://laradock.io/">https://laradock.io/</a></p><p>2. Setup file Host in windows/system32/host</p><p>[CODE]127.0.0.1 hello.localhost[/CODE]</p><p>Test ping CMD "ping hello.localhost"</p><p>3. Edit .env in Laradock/env-example</p><p>[CODE]### PHP MY ADMIN ##########################################</p><p></p><p># Accepted values: mariadb - mysql</p><p></p><p>PMA_DB_ENGINE=mariadb</p><p></p><p># Credentials/Port:</p><p></p><p>PMA_USER=default</p><p>PMA_PASSWORD=secret</p><p>PMA_ROOT_PASSWORD=secret</p><p>PMA_PORT=8069</p><p>PMA_MAX_EXECUTION_TIME=600</p><p>PMA_MEMORY_LIMIT=256M</p><p>PMA_UPLOAD_LIMIT=2G[/CODE]</p><p>4. Edit Laradock/nghinx: xinchao\laradock\nginx\sites\hello.config</p><p>[CODE]server {</p><p></p><p> listen 80;</p><p> listen [::]:80;</p><p></p><p> # For https</p><p> # listen 443 ssl default_server;</p><p> # listen [::]:443 ssl default_server ipv6only=on;</p><p> # ssl_certificate /etc/nginx/ssl/default.crt;</p><p> # ssl_certificate_key /etc/nginx/ssl/default.key;</p><p></p><p> server_name hello.localhost;</p><p> root /var/www/hello;</p><p> index index.php index.html index.htm;</p><p></p><p> location / {</p><p> try_files $uri $uri/ /index.php$is_args$args;</p><p> }</p><p></p><p> location ~ \.php$ {</p><p> try_files $uri /index.php =404;</p><p> fastcgi_pass php-upstream;</p><p> fastcgi_index index.php;</p><p> fastcgi_buffers 16 16k;</p><p> fastcgi_buffer_size 32k;</p><p> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;</p><p> #fixes timeouts</p><p> fastcgi_read_timeout 600;</p><p> include fastcgi_params;</p><p> }</p><p></p><p> location ~ /\.ht {</p><p> deny all;</p><p> }</p><p></p><p> location /.well-known/acme-challenge/ {</p><p> root /var/www/letsencrypt/;</p><p> log_not_found off;</p><p> }</p><p>}[/CODE]</p><p>5. Cài đặt image docker:</p><p>[CODE]docker-compose up -d nginx phpmyadmin mariadb workspace php-fpm[/CODE]</p><p>6. Edit file wp-config.php in folder hello(wordpress is download):</p><p>[CODE]// ** Database settings - You can get this info from your web host ** //</p><p>/** The name of the database for WordPress */</p><p>define( 'DB_NAME', 'hello' );</p><p></p><p>/** Database username */</p><p>define( 'DB_USER', 'root' );</p><p></p><p>/** Database password */</p><p>define( 'DB_PASSWORD', 'root' );</p><p></p><p>/** Database hostname */</p><p>define( 'DB_HOST', 'mysql' );</p><p></p><p>/** Database charset to use in creating database tables. */</p><p>define( 'DB_CHARSET', 'utf8' );</p><p></p><p>/** The database collate type. Don't change this if in doubt. */</p><p>define( 'DB_COLLATE', '' );[/CODE]</p><p>8. Enter website url website: hello.localhost</p></blockquote><p></p>
[QUOTE="administrator, post: 45, member: 1"] Video: [MEDIA=youtube]PI28DiNwbj4:240[/MEDIA] 1. Pull Laradock: [URL]https://laradock.io/[/URL] 2. Setup file Host in windows/system32/host [CODE]127.0.0.1 hello.localhost[/CODE] Test ping CMD "ping hello.localhost" 3. Edit .env in Laradock/env-example [CODE]### PHP MY ADMIN ########################################## # Accepted values: mariadb - mysql PMA_DB_ENGINE=mariadb # Credentials/Port: PMA_USER=default PMA_PASSWORD=secret PMA_ROOT_PASSWORD=secret PMA_PORT=8069 PMA_MAX_EXECUTION_TIME=600 PMA_MEMORY_LIMIT=256M PMA_UPLOAD_LIMIT=2G[/CODE] 4. Edit Laradock/nghinx: xinchao\laradock\nginx\sites\hello.config [CODE]server { listen 80; listen [::]:80; # For https # listen 443 ssl default_server; # listen [::]:443 ssl default_server ipv6only=on; # ssl_certificate /etc/nginx/ssl/default.crt; # ssl_certificate_key /etc/nginx/ssl/default.key; server_name hello.localhost; root /var/www/hello; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri /index.php =404; fastcgi_pass php-upstream; fastcgi_index index.php; fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #fixes timeouts fastcgi_read_timeout 600; include fastcgi_params; } location ~ /\.ht { deny all; } location /.well-known/acme-challenge/ { root /var/www/letsencrypt/; log_not_found off; } }[/CODE] 5. Cài đặt image docker: [CODE]docker-compose up -d nginx phpmyadmin mariadb workspace php-fpm[/CODE] 6. Edit file wp-config.php in folder hello(wordpress is download): [CODE]// ** Database settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define( 'DB_NAME', 'hello' ); /** Database username */ define( 'DB_USER', 'root' ); /** Database password */ define( 'DB_PASSWORD', 'root' ); /** Database hostname */ define( 'DB_HOST', 'mysql' ); /** Database charset to use in creating database tables. */ define( 'DB_CHARSET', 'utf8' ); /** The database collate type. Don't change this if in doubt. */ define( 'DB_COLLATE', '' );[/CODE] 8. Enter website url website: hello.localhost [/QUOTE]
Mã xác nhận
Tên miền của diễn đàn (diendan.websitecuatoi.com)
Trả lời
Home
Trang nhất
Design & Seo website
PHP & MySQL
SQL
[Docker] How use Laradock for any project web (Laravel, wordpress, php, anymore)?
Bên trên
Bottom