个人工具

“Ubuntu/Step by step”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
Web Server (Apache2)
Web Server (Apache2)
第16行: 第16行:
 
<pre>
 
<pre>
 
# Installation
 
# Installation
 +
 
sudo apt-get install apache2
 
sudo apt-get install apache2
  
# New web site in ~/JUniverse
+
# Create a new web site JUniverse
 +
# Customer can create a directory named JUnivers, like ~/JUniverse.
 +
 
 
cd /var/www/html
 
cd /var/www/html
  
sudo ln -s ~/JUniverse juniverse
+
# Create link for JUniverse
 +
 
 +
sudo ln -s ~/JUniverse JUniverse
  
 
cd /etc/apache2/sites-available
 
cd /etc/apache2/sites-available
  
sudo cp 000-default.conf
+
sudo cp 000-default.conf juniverse.conf
 +
 
 +
sudo nano juniverse.conf
 +
 
 +
# updating it as below
 +
 
 +
<VirtualHost *:81>
 +
 
 +
DocumentRoot /var/www/JUniverse
 +
 
 +
# save and exit
 +
 
 +
# restart
 +
 
 +
sudo a2ensite juniverse.conf
 +
 
 +
sudo service apache2 restart
 
</pre>
 
</pre>

2016年10月26日 (三) 22:42的版本

Update & Upgrade

# Make sure your list of packages is update to date, and system upgrade 
sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

sudo apt-get autoremove

Web Server (Apache2)

# Installation

sudo apt-get install apache2

# Create a new web site JUniverse
# Customer can create a directory named JUnivers, like ~/JUniverse.

cd /var/www/html

# Create link for JUniverse

sudo ln -s ~/JUniverse JUniverse

cd /etc/apache2/sites-available

sudo cp 000-default.conf juniverse.conf

sudo nano juniverse.conf

# updating it as below

<VirtualHost *:81>

DocumentRoot /var/www/JUniverse

# save and exit

# restart

sudo a2ensite juniverse.conf

sudo service apache2 restart