Ngày 02 - Cài đặt Drupal site

Ngày 02 - Cài đặt Drupal site

My SQL Commands

Connect

mysql -u root -proot -h localhost


Exit

ctrl+c

quit;


Show database

SHOW DATABASES;


Create new user:

CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'drupalpass';


Create new database:

CREATE DATABASE drupal_training


Grant user to database

GRANT ALL PRIVILEGES ON *.* TO 'drupal'@'%'

Nginx Configuration

server {

server_name training.drupal.local;

listen 192.168.56.115:80;

root /var/www/training.drupal.local;


location = /favicon.ico {

log_not_found off;

access_log off;

}


location = /robots.txt {

allow all;

log_not_found off;

access_log off;

}


# This matters if you use drush

location = /backup {

deny all;

}


# Very rarely should these ever be accessed outside of your lan

location ~* \.(txt|log)$ {

allow 192.168.0.0/16;

deny all;

}


location ~ \..*/.*\.php$ {

return 403;

}


location / {

# This is cool because no php is touched for static content

try_files $uri @rewrite;

}


location @rewrite {

# Some modules enforce no slash (/) at the end of the URL

# Else this rewrite block wouldn't be needed (GlobalRedirect)

rewrite ^/(.*)$ /index.php?q=$1;

}


location ~ \.php$ {

fastcgi_split_path_info ^(.+\.php)(/.+)$;

#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

include fastcgi_params;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_intercept_errors on;

fastcgi_pass 127.0.0.1:9000;

}


# Fighting with ImageCache? This little gem is amazing.

location ~ ^/sites/.*/files/imagecache/ {

try_files $uri @rewrite;

}

# Catch image styles for D7 too.

location ~ ^/sites/.*/files/styles/ {

try_files $uri @rewrite;

}


location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {

expires max;

log_not_found off;

}

}
Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Bình luận (0)

 

Add Comment

Filtered HTML

  • Các địa chỉ web và email sẽ tự động được chuyển sang dạng liên kết.
  • Các thẻ HTML được chấp nhận: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Tự động ngắt dòng và đoạn văn.

Plain text

  • No HTML tags allowed.
  • Các địa chỉ web và email sẽ tự động được chuyển sang dạng liên kết.
  • Tự động ngắt dòng và đoạn văn.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Facebook mừng Quốc khánh Việt Nam 2-9-2015

Facebook mừng Quốc khánh Việt Nam 2-9-2015

Mạng xã hội lớn nhất thế giới tung ra hình ảnh riêng với biểu tượng cờ đỏ, sao vàng nhằm chúc mừng người dùng Việt Nam nhân ngày 2/9.

Tính năng mới After Effects: Tự Điền Nội Dung – Content Aware Fill

Tự Điền Nội Dung – Content Aware Fill một tính năng mới After Effects

Mới đây, hãng Adobe thông báo đã mang tính năng mới “Content – Aware Fill” vào After Effects – phần mềm chuyên nghiệp trong xử lý hiệu ứng kỹ xảo hình ảnh.

Firefox 9.0 Beta 4 lướt web nhanh và mượt hơn

Firefox 9.0 Beta 4 lướt web nhanh và mượt hơn

Nhịp điệu mỗi tuần ra một bản Beta mới của Firefox vẫn được Mozilla duy trì. Tương tự những lần trước, Firefox 9.0 Beta 4 cũng cải thiện về tốc độ xử lý JavaScript và giảm chiếm dụng bộ nhớ đôi chút.

Công ty diệt chuột T&C

 

Diet con trung