Difference between revisions of "WebServer - UserDir"

From The TinkerNet Wiki
Jump to navigation Jump to search
(Created page with "* UserDir ** <code>sudo a2enmod userdir</code> ** <code>service apache2 restart</code> ** <code>sudo nano /etc/apache2/mods-enabled/userdir.conf</code> *** (see: http://www.te...")
 
Line 1: Line 1:
* UserDir
+
Sometimes, you might want individual users with accounts on the webserver to have personal pages...
** <code>sudo a2enmod userdir</code>
+
 
** <code>service apache2 restart</code>
+
*<code>sudo a2enmod userdir</code>
** <code>sudo nano /etc/apache2/mods-enabled/userdir.conf</code>
+
*<code>service apache2 restart</code>
*** (see: http://www.techytalk.info/enable-userdir-apache-module-ubuntu-debian-based-linux-distributions/)
+
*<code>sudo nano /etc/apache2/mods-enabled/userdir.conf</code>
*** <span style="color:#e74c3c">'''NOTE:&nbsp; Verify that you are using the configuration for the correct version of Apache!'''</span>
+
**(see: http://www.techytalk.info/enable-userdir-apache-module-ubuntu-debian-based-linux-distributions/)
** <code>mkdir ~/public_html</code>
+
**<span style="color:#e74c3c">'''NOTE:&nbsp; Verify that you are using the configuration for the correct version of Apache!'''</span>
** <code>chmod ugo+rX ~/public_html</code>
+
 
** create an index.html file in ~/public_html
+
To set up a personal page for the currently logged-in user:
 +
 
 +
*<code>mkdir ~/public_html</code>
 +
*<code>chmod ugo+rX ~/public_html</code>
 +
*create an index.html file in ~/public_html
 +
 
 +
Assuming this users name is fred, his page can now be reached at '''MyServer.MyDomain.net/~fred/'''

Revision as of 17:20, 24 June 2020

Sometimes, you might want individual users with accounts on the webserver to have personal pages...

To set up a personal page for the currently logged-in user:

  • mkdir ~/public_html
  • chmod ugo+rX ~/public_html
  • create an index.html file in ~/public_html

Assuming this users name is fred, his page can now be reached at MyServer.MyDomain.net/~fred/