Grand Ubuntu Cloud Host Configuration method

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

At present, the more excellent cloud host suppliers have Sheng and Aliyun, in contrast to the use of the grand cloud more flexible, real on-demand use, and often activities, so that users get more benefits, Wang Guangwei Blog station on the use of Grand Ubuntu Cloud host system. Many users at the beginning of the unskilled configuration Ubuntu server, my configuration methods are as follows, for your reference.

Because I am logged in directly to the root account, sudo is not used in all commands, and if you do not use the root permission, add sudo directly to the command when it is used. I want to create a new Web site weilog.org, login with Putty software, enter username and password, password is not displayed, so the direct return to the end, with command sudo adduser weilog.org Add User directory, and then the system will automatically let you enter the password, direct input can, if there is no hint, this operation sudo passwd weilog.org, according to the above operation, in the FileSystem directory has a weilog.org directory. Then execute the mkdir/home/weilog.org/public_html in the weilog.org directory to establish a directory public_html to store the Web site files.

Next configure Apache2, point to the site directory corresponding to the domain name, and before modifying any programs, back up the files that need to be modified. Command: Cd/etc/apache2/sites-availablels to see the default and Default-ssl two profiles inside, we mainly configure default because we want to place multiple level two sites, So each site is configured with one file for easy management. Duplicate default and rename Web site name sudo cp default default_backup (backup default file) sudo cp default weilog.org (Weilog.org is the new site) sudo VI Weilog.org (This is the modification configuration file) I put the new site in the/home/weilog.org/public_html/directory, so we modify the configuration file weilog.org the following (domain name, domain name alias)

ServerAdmin office@weilog.org

ServerName weilog.org

Serveralias http://www.weilog.org

Documentroot/home/weilog.org/public_html

Options FollowSymLinks

AllowOverride None

Options Indexes followsymlinks MultiViews

AllowOverride None

Order Allow,deny

Allow from all

scriptalias/cgi-bin//usr/lib/cgi-bin/

AllowOverride None

Options +execcgi-multiviews +symlinksifownermatch

Order Allow,deny

Allow from all

Errorlog/var/log/apache2/error.log

# Possible values Include:debug, info, notice, warn, error, crit,

# Alert, Emerg.

LogLevel warn

Customlog/var/log/apache2/access.log combined

alias/doc/"/usr/share/doc/"

Options Indexes multiviews FollowSymLinks

AllowOverride None

Order Deny,allow

Deny from all

Allow from 127.0.0.0/255.0.0.0:: 1/128

After the configuration is over, enable the Web site sudo a2ensite weilog.org (the function of this command is to generate a soft link file weilog.org under sites-enable), that is, the site is enabled. If you are putting all the configuration files in the default configuration file, then sudo a2ensite weilog.org This command is not executed because the sites-enabled already exists, which is already enabled. If it is a configuration file for each Web site, then this command must be executed. Restart apache2 command: sudo/etc/init.d/apache2 Reload

Now you can transfer files, access to the site, because it is personal use, so I directly use the WINSCP software upload file compression package, and then extract the command to extract the file package. Because I use the WordPress program needs to have the site group permissions, so do the following operation, sudo chown-r www-data:www-data/home/weilog.org/public_ HTML if the website rewrite module is not open, use sudo a2enmod rewrite.

Original article, reproduced please specify: reprinted from Wang Guangwei blog, this article link address Grand Ubuntu Cloud Host Configuration method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.