ผลต่างระหว่างรุ่นของ "ฐานความรู้"
ไปยังการนำทาง
ไปยังการค้นหา
Cardcaptor (คุย | มีส่วนร่วม) |
Cardcaptor (คุย | มีส่วนร่วม) |
||
แถว 15: | แถว 15: | ||
Options Indexes SymLinksIfOwnerMatch IncludesNoExec | Options Indexes SymLinksIfOwnerMatch IncludesNoExec | ||
</Directory> | </Directory> | ||
+ | |||
+ | Third, execute the following command: | ||
+ | cd /etc/apache2/mods-enabled | ||
+ | sudo ln -s /etc/apache2/mods-available/userdir.conf userdir.conf | ||
+ | sudo ln -s /etc/apache2/mods-available/userdir.load userdir.load | ||
+ | |||
+ | Forth, restart your apache2: | ||
+ | sudo /etc/init.d/apache2 restart |
รุ่นแก้ไขเมื่อ 08:51, 16 มีนาคม 2551
Apache2 on Ubuntu
Enabling User Directory
This is how to set up Apache2 on Ubuntu so that, when hxxp://server/~username is accessed, the browser returns the content in /home/username/public_html.
First, user directory is now a mod in Ubuntu's apache2. If you have not installed the mod, then execute the following command:
sudo a2enmod userdir
Second, edit /etc/apache2/apache2.conf and add the following lines:
<IfModule mod_userdir.c> UserDir public_html </IfModule> <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options Indexes SymLinksIfOwnerMatch IncludesNoExec </Directory>
Third, execute the following command:
cd /etc/apache2/mods-enabled sudo ln -s /etc/apache2/mods-available/userdir.conf userdir.conf sudo ln -s /etc/apache2/mods-available/userdir.load userdir.load
Forth, restart your apache2:
sudo /etc/init.d/apache2 restart