Edit History Actions Discussion

Diff for "Info/Webhosting"

Differences between revisions 1 and 19 (spanning 18 versions)
Revision 1 as of 2007-09-20 19:33:18
Size: 1806
Comment:
Revision 19 as of 2021-06-09 18:56:46
Size: 2065
Editor: gsi
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
You can host your personal webpage or files at Blinkenshell.org. To do this, put any files you want accessable via HTTP in the directory public_html in your home directory. You can host your own personal webpage at Blinkenshell. To do this, put any files you want to be accessible via HTTP in the directory public_html in your home directory. The URL to your webpage will be `https://username.u.blinkenshell.org/` (old accounts have no HTTPS and are available at `http://username.blinkenshell.org` instead, ask independence if you want to migrate to the new hostname and HTTPS)
Line 5: Line 5:
If you have a file named `index.html` or `index.php` that file will be used as the index page when someone browses to your site without specifying a specific file (ie `http://user.blinkenshell.org/` ) If you do not have an index file a direcory listing of all the files in your public_html will be shown instead. If you have a file named `index.html` in your public_html directory that file will be used as the index page when someone browses to your site without requesting a specific file (i.e. `https://username.u.blinkenshell.org/`). If you do not have an index file a directory listing of all the files in your `public_html` will be shown instead.
Line 7: Line 7:
You can use apache .htaccess-files to customize the behaviour of your webpage. [http://httpd.apache.org/docs/2.0/howto/htaccess.html Apache documentation on .htaccess files]. You can use Apache `.htaccess`-files to customize the behaviour of your webpage. [[http://httpd.apache.org/docs/2.0/howto/htaccess.html|Apache documentation on htaccess]].
Line 9: Line 9:
You can use PHP for your webpage. PHP is configured with su_php which will make all scripts execute as your user permissions instead of the apache user. Also, suhosin is enabled to further increase security. For security reasons, all your php files must ''not'' be writeable by "group" or "others" (permission: `rwx r-x r-x` or lower is required). Logs from apache are written to `~/logs/access.log` (normal traffic) and `~/logs/error.log` (errors). These files should not be removed.
Line 11: Line 11:
CGI is enabled in `~/public_html/cgi-bin` and executed with suexec. == CGI ==
Line 13: Line 13:
The URL to your webpage is: `http://<yourusername>.blinkenshell.org` or `http://blinkenshell.org/titan/~<yourusername>` [[CGI]] and [[PHP]] is only available on [[Info/Supporter|Supporter accounts]].
Line 15: Line 15:
All requests to your webpage are handled by Apache on the shell server. However, the requests are proxied by a "reverse proxy" on the way. This might cause some problems, especially PHP/CGI scripts that doesn't take this into account. A common failiure is to not properly figuring out what URL to redirect after submitting a form. This is because there is no way for the script to know what URL the user should enter to access the script, since it's being rewritten by the proxying server. This is often solved by specifying a "base URL" in the script configuration file. You can use [[PHP]] and [[CGI]] scripts to create dynamic webpages. CGI and PHP scripts are executed with mod_fcgi and suexec, which will make all scripts execute with your user id instead of the Apache user.

[[PHP]] and [[Python]] are installed. You can install your own frameworks such as Django if you like, but they are not installed system-wide.

== MySQL ==

For information on how to use MySQL, see: [[Info/MySQL]].

== External links ==

 * [[http://httpd.apache.org/docs/2.2/|Apache Docs]]
 * [[http://httpd.apache.org/docs/2.2/howto/htaccess.ht|Apache Docs: htaccess]]
 * [[http://httpd.apache.org/docs/2.2/suexec.html|Apache Docs: suexec]]
 * [[http://php.net/|PHP Website]]
 * [[http://www.hardened-php.net/suhosin/|Suhosin (Hardened PHP)]]
 * [[http://www.dartmouth.edu/~rc/help/faq/permissions.html|UNIX file permissions tutorial]]

----
CategoryInfo

Webhosting

You can host your own personal webpage at Blinkenshell. To do this, put any files you want to be accessible via HTTP in the directory public_html in your home directory. The URL to your webpage will be https://username.u.blinkenshell.org/ (old accounts have no HTTPS and are available at http://username.blinkenshell.org instead, ask independence if you want to migrate to the new hostname and HTTPS)

If you have a file named index.html in your public_html directory that file will be used as the index page when someone browses to your site without requesting a specific file (i.e. https://username.u.blinkenshell.org/). If you do not have an index file a directory listing of all the files in your public_html will be shown instead.

You can use Apache .htaccess-files to customize the behaviour of your webpage. Apache documentation on htaccess.

Logs from apache are written to ~/logs/access.log (normal traffic) and ~/logs/error.log (errors). These files should not be removed.

CGI

CGI and PHP is only available on Supporter accounts.

You can use PHP and CGI scripts to create dynamic webpages. CGI and PHP scripts are executed with mod_fcgi and suexec, which will make all scripts execute with your user id instead of the Apache user.

PHP and Python are installed. You can install your own frameworks such as Django if you like, but they are not installed system-wide.

MySQL

For information on how to use MySQL, see: Info/MySQL.


CategoryInfo