Difference between revisions of "WebArea/En"

From TuxFamilyFAQ
Jump to navigationJump to search
m (Update broken url)
 
(51 intermediate revisions by 11 users not shown)
Line 7: Line 7:
 
A Website allows you to put some web pages online (surprising eh ?).
 
A Website allows you to put some web pages online (surprising eh ?).
 
You can use almost all php softwares but also static pages.
 
You can use almost all php softwares but also static pages.
We provide Php4 AND php5 (see the configuration section of this page for more informations)
+
 
 +
== Supported languages ==
 +
 
 +
All, php7, php5, Perl, python, ruby by default; ask if you need another one, as well as if you need a module. But don't expect either mod_php, nor mod_python, nor mod_perl, nor RoR (not yet for this one, see below !).
 +
 
 +
About PHP configuration: http://hack.tuxfamily.org/phpinfo.php7 and http://hack.tuxfamily.org/phpinfo.php
  
 
= Dependencies =
 
= Dependencies =
Line 22: Line 27:
  
 
*Be careful when asking for a website, specially when filling up the "name" field (see next section for more informations)
 
*Be careful when asking for a website, specially when filling up the "name" field (see next section for more informations)
*Don't forget to fill up the description. This description will be displayed on the [http://projects.tuxfamily.org/allwebsites.pl list of all hosted websites] so take the time to write a nice description (don't forget the license!)
+
*Don't forget to fill up the description. This description will be displayed on the [https://projects.tuxfamily.org/?do=allgroups list of all hosted projects] so take the time to write a nice description (don't forget the license!)
  
 
==Choosing the website name==
 
==Choosing the website name==
Line 31: Line 36:
  
 
If you own a [http://en.wikipedia.org/wiki/DNS domain] (mydomain.org for example): then you might want to create a website www.mydomain.org or wiki.mydomain.org.  
 
If you own a [http://en.wikipedia.org/wiki/DNS domain] (mydomain.org for example): then you might want to create a website www.mydomain.org or wiki.mydomain.org.  
In '''ANY''' case, do '''NOT''' put "www" in the servername field: just ask for a website named mydomain.org or wiki.mydomain.org. The panel is smart enough, it will redirect www.mydomain.com to the website named mydomain.com.  
+
In '''ANY''' case, do '''NOT''' put "www" in the servername field: just ask for a website named mydomain.org or wiki.mydomain.org. The panel is smart enough, it will alias www.mydomain.com to the website named mydomain.com.  
  
 
TuxFamily does not sell domain names, so make sure that the domain is yours before asking a website. If you want a domain, you can buy one [http://www.gandi.net here] for example.  
 
TuxFamily does not sell domain names, so make sure that the domain is yours before asking a website. If you want a domain, you can buy one [http://www.gandi.net here] for example.  
  
Of course, don't forget to create an alias on your domain configuration page (www.mydomain.org => web.tuxfamily.net and mydomain.org => web.tuxfamily.net) otherwise, it won't work...
+
Of course, don't forget to create an alias on your domain configuration page (www.mydomain.org and mydomain.org => web.tuxfamily.net. (212.85.158.4 / 2a02:2178:1000:201::4) ) otherwise, it won't work...
  
 
You can also, if you want, host your [[DNS/En|DNS]] on TuxFamily, isn't life nice ? :D
 
You can also, if you want, host your [[DNS/En|DNS]] on TuxFamily, isn't life nice ? :D
 +
 +
If you already have a site accessible by an project.tuxfamily.org address type and you want to migrate to an project.org address type, then you may be interested in this page: [[MigrationDomainName/En | How to change from project.tuxfamily.org to project.org address?]]
  
 
===If you don't have a domain===
 
===If you don't have a domain===
  
 
If you don't have a domain, you will have to ask for a *.tuxfamily.org website. If you want mywebsite.tuxfamily.org, ask for a web space named "mywebsite.tuxfamily.org" again, no www !
 
If you don't have a domain, you will have to ask for a *.tuxfamily.org website. If you want mywebsite.tuxfamily.org, ask for a web space named "mywebsite.tuxfamily.org" again, no www !
 +
 +
'''Warning''': You can ask for ''mywebsite.tuxfamily.org'' and ''forum.mywebsite.tuxfamily.org'' but you can't for ''mywebsite.forum.tuxfamily.org''.
 +
 +
''forum.tuxfamily.org'' already exists for TuxFamily and all the ''*.forum.tuxfamily.org'' are reserved. It's the same for all the urls of TuxFamily like forum, faq, projects or panel. More generally, when you ask for ''foo.bar.tuxfamily.org'' be sure that ''bar'' doesn't belong to anybody (or is yours). When in doubt, search for ''bar'' on [http://projects.tuxfamily.org/ the projects page].
  
 
= Moderation =
 
= Moderation =
Line 51: Line 62:
 
Use the panel to access the website configuration page.
 
Use the panel to access the website configuration page.
 
You can change the description.
 
You can change the description.
In this section, you will also find a link to your website's statistics.
 
  
== How to use it ==
+
== How to play with types and handlers ==
 +
 
 +
On TuxFamily, you can play with the types and handlers to modify how scripts are executed
  
How can I choose between Php4 and Php5 ?
 
There are two ways to use php5 on TuxFamily:
 
  
*By extension
+
The handlers are configured as follows:
By default, scripts with a .php extension will be run as php4 scripts. Those with a .php5 extension will be run as php5 scripts.
 
  
*By .htaccess file
+
Name of MIME type            Interpreter          Associated extensions
If you want all your .php files to be read in as php5 scripts, you simply have to create a .htaccess file in your folder which includes the following lines :
+
application/x-httpd-php5      /usr/bin/php5-cgi    .php .php3 .php4 .php5 .phtml
 +
application/x-httpd-php7      /usr/bin/php-cgi7.3  .php7
 +
  application/x-httpd-perl      /usr/bin/perl        .pl
 +
application/x-httpd-python    /usr/bin/python      .py
 +
application/x-httpd-bash      /bin/bash            .sh
 +
application/x-httpd-ruby      /usr/bin/ruby        .rb
 +
application/x-httpd-eruby    /usr/bin/eruby        .rhtml
 +
application/x-httpd-scheme    /usr/bin/csi          .scm .ss
 +
application/x-httpd-self      self execution        .cgi      (using the script shebang) 
  
  AddHandler x-httpd-php5 .php
+
=== PHP7 ===
  AddType application/x-httpd-php5 .php
+
 
 +
In order to execute PHP7 instead of PHP5, edit/add a .htaccess file and add:
 +
 
 +
  AddType application/x-httpd-php7 .php
 +
 
 +
=== Self-execution ===
 +
 
 +
How can I execute my perl through shebang? (example)
 +
 
 +
Please edit/add a .htaccess file and add:
 +
 
 +
  AddType application/x-httpd-self .pl
  
 
== How to manage permissions ==
 
== How to manage permissions ==
Line 72: Line 100:
  
 
* the access to the website configuration using [[Acl/Fr|ACL]]
 
* the access to the website configuration using [[Acl/Fr|ACL]]
* the access to the files files of the website using the [http://en.wikipedia.org/wiki/Unix_permission#Traditional_Unix_permissions unix permissions(en)]
+
* the access to the files files of the website using the [http://en.wikipedia.org/wiki/Unix_permission#Traditional_Unix_permissions unix permissions(en)]:
 +
$ ssh user@ssh.tuxfamily.org "chmod 755 group group/webarea.tuxfamily.org-web \
 +
    group/webarea.tuxfamily.org-web/htdocs"
  
== How to delete ==
+
== How to delete it ==
  
 
* Log in on the panel
 
* Log in on the panel
Line 80: Line 110:
 
* click on your website
 
* click on your website
 
* click on delete
 
* click on delete
 +
 +
= How to use it =
  
 
== How do I upload files on my website ? ==
 
== How do I upload files on my website ? ==
  
* the files are to be uploaded in the htdocs/ folder in your website folder on the FTP server ('''ftp.tuxfamily.org'''), SFTP server ('''sftp.tuxfamily.org'''), SSH server ( '''ssh.tuxfamily.org''' ). Your user name and password are the one you use to log on the panel.
+
* the files are to be uploaded in the htdocs/ folder in your website folder on the FTP server ('''ftp.tuxfamily.org'''), SFTP server ('''sftp.tuxfamily.org'''), SSH server ( '''ssh.tuxfamily.org''' ). Your user name and password are the one you use to log on the panel. Also, you must [[User/En#SSH_access|activate a shell]] on your account before using SFTP or SSH. Imagine you have a group 'group' and the website webarea.tuxfamily.org, the files must be uploaded into group/webarea.tuxfamily.org-web/htdocs/ on the FTP, that can be accessed by rsync over SSH:
Imagine you have a group 'toto' and the website toto.tuxfamily.org, the files must be uploaded into toto/toto.tuxfamily.org-web/htdocs/ on the FTP.
+
$ rsync -av ./webarea/ user@ssh.tuxfamily.org:group/webarea.tuxfamily.org-web/htdocs/
 
* The folder of the website is in the your group's folder (which is in your starting folder on the FTP). It ends with the suffix "-web".
 
* The folder of the website is in the your group's folder (which is in your starting folder on the FTP). It ends with the suffix "-web".
 
* the tmp/ folder is used for temporary files of PHP as well as sessions.
 
* the tmp/ folder is used for temporary files of PHP as well as sessions.
 
* DO NOT put your PHP scripts or ANY files in chmod 777. They won't execute anyway and it is a serious security issue!
 
* DO NOT put your PHP scripts or ANY files in chmod 777. They won't execute anyway and it is a serious security issue!
 
* the statistics of your website are available on http://stats.tuxfamily.org/YOURWEBSITE/. For example: http://stats.tuxfamily.org/faq.tuxfamily.org/  
 
* the statistics of your website are available on http://stats.tuxfamily.org/YOURWEBSITE/. For example: http://stats.tuxfamily.org/faq.tuxfamily.org/  
 +
** for this purpose, we use [[Awstats/En|awstats]]; we hope that you'll like it.
 
* if you get a 500 error:
 
* if you get a 500 error:
  
Line 101: Line 134:
 
Make sure that your FTP client handle symbolic links otherwise you won't be able to browse your projects. Of course, do not delete those symbolic links!
 
Make sure that your FTP client handle symbolic links otherwise you won't be able to browse your projects. Of course, do not delete those symbolic links!
  
 +
== Copy files to download repository ==
 +
You can access to your download repository from the web servers in the folder /data/repository, /data/repository/vhffs4 for the vhffs4 group for example.
 +
 +
However, you '''must not''' access this folder very often, it only needs to be used to upload file from the web service to your download repository, you should not read files on these repository and above all you must really not even consider one second to list the content of the folders. In other word, you should keep an index of uploaded files and provide URLs that look like http://download.tuxfamily.org/.../ to your visitors.
  
 +
== How to enable TLS/HTTPS? ==
 +
 +
You do not need to do anything, TLS certificates are generated once a day during the night through [https://letsencrypt.org/ Let's Encrypt] so during the first day you will not have a dedicated TLS certificate.
 +
 +
Once the certificate has been automatically generated you will see in the Web area administration:
 +
 +
TLS state
 +
Global state: Valid
 +
 +
Expire: 10/12/2018 03:30:29 AM
 +
 +
Retries: 0
 +
 +
Domain list: www.forum.tuxfamily.org forum.tuxfamily.org
  
 
= Tips and tricks =
 
= Tips and tricks =
 +
 +
*You '''HAVE TO''' upgrade the webapps you are using (wiki, CMS, blog, ...) in order to fix their numerous security issues. This is mandatory, we require that you do that. Not doing that (voluntarily or not) is considered disrespectful.
  
 
*Do '''NOT''' put a 777 mode on one of yours php files. you can have security issues and it won't be loaded by our servers!
 
*Do '''NOT''' put a 777 mode on one of yours php files. you can have security issues and it won't be loaded by our servers!
Line 115: Line 168:
 
**whatever.yourdomain.tld
 
**whatever.yourdomain.tld
  
*If you just deleted you htdocs folder, come on our irc channel, an admin may be able to do something for you.
+
*If you just deleted your htdocs folder, come on our irc channel, an admin may be able to do something for you.
  
 
*If you can't upload your files without error, you need more disk-space. Try sending a mail to the staff to get your quota enlarged :)
 
*If you can't upload your files without error, you need more disk-space. Try sending a mail to the staff to get your quota enlarged :)
Line 125: Line 178:
 
*If you want to use mod_rewrite in a .htaccess, start your .htaccess with:
 
*If you want to use mod_rewrite in a .htaccess, start your .htaccess with:
 
  RewriteEngine On
 
  RewriteEngine On
  RewriteBase  /path/to/your/software  ( ex: / if rules are applied on the root of your website, /forum , /wiki , ... in other cases )
+
  RewriteBase  /path/to/your/software  # ex: / if rules are applied on the root of your website, /forum , /wiki , ... in other cases
  
 
* Promote [[PubTuxfamily/En|TuxFamily]] with a link.
 
* Promote [[PubTuxfamily/En|TuxFamily]] with a link.
 
== Copy files to download repository ==
 
You can access to your download repository from the web servers in the folder /data/repository, /data/repository/vhffs4 for the vhffs4 group for example.
 
 
However, you '''must not''' access this folder very often, it only needs to be used to upload file from the web service to your download repository, you should not read files on these repository and above all you must really not even consider one second to list the content of the folders. In other word, you should keep an index of uploaded files and provide URLs that look like http://download.tuxfamily.org/.../ to your visitors.
 
  
 
= Compatibility with some third party applications =
 
= Compatibility with some third party applications =
Line 142: Line 190:
 
[[WebArea/Compat/Flyspray/En|Flyspray, "Paths and rights problems"]].
 
[[WebArea/Compat/Flyspray/En|Flyspray, "Paths and rights problems"]].
  
= Useful Links =
+
[[WebArea/Compat/MoinMoin|MoinMoin, "MoinMoin installation"]].
 +
 
 +
[[WebArea/Compat/PHP|PHP on TuxFamily]].
 +
 
 +
[[WebArea/Compat/Python|Python on TuxFamily]].

Latest revision as of 17:56, 11 February 2022

Websites



Description

A Website allows you to put some web pages online (surprising eh ?). You can use almost all php softwares but also static pages.

Supported languages

All, php7, php5, Perl, python, ruby by default; ask if you need another one, as well as if you need a module. But don't expect either mod_php, nor mod_python, nor mod_perl, nor RoR (not yet for this one, see below !).

About PHP configuration: http://hack.tuxfamily.org/phpinfo.php7 and http://hack.tuxfamily.org/phpinfo.php

Dependencies

Creation

As usual, you will have to login on the panel. Select the project which need a website and use the "create" link in the website menu. Fill up the form, submit it and wait for moderation.

Trick and tips

  • Be careful when asking for a website, specially when filling up the "name" field (see next section for more informations)
  • Don't forget to fill up the description. This description will be displayed on the list of all hosted projects so take the time to write a nice description (don't forget the license!)

Choosing the website name

You have two options :

If you own a domain

If you own a domain (mydomain.org for example): then you might want to create a website www.mydomain.org or wiki.mydomain.org. In ANY case, do NOT put "www" in the servername field: just ask for a website named mydomain.org or wiki.mydomain.org. The panel is smart enough, it will alias www.mydomain.com to the website named mydomain.com.

TuxFamily does not sell domain names, so make sure that the domain is yours before asking a website. If you want a domain, you can buy one here for example.

Of course, don't forget to create an alias on your domain configuration page (www.mydomain.org and mydomain.org => web.tuxfamily.net. (212.85.158.4 / 2a02:2178:1000:201::4) ) otherwise, it won't work...

You can also, if you want, host your DNS on TuxFamily, isn't life nice ? :D

If you already have a site accessible by an project.tuxfamily.org address type and you want to migrate to an project.org address type, then you may be interested in this page: How to change from project.tuxfamily.org to project.org address?

If you don't have a domain

If you don't have a domain, you will have to ask for a *.tuxfamily.org website. If you want mywebsite.tuxfamily.org, ask for a web space named "mywebsite.tuxfamily.org" again, no www !

Warning: You can ask for mywebsite.tuxfamily.org and forum.mywebsite.tuxfamily.org but you can't for mywebsite.forum.tuxfamily.org.

forum.tuxfamily.org already exists for TuxFamily and all the *.forum.tuxfamily.org are reserved. It's the same for all the urls of TuxFamily like forum, faq, projects or panel. More generally, when you ask for foo.bar.tuxfamily.org be sure that bar doesn't belong to anybody (or is yours). When in doubt, search for bar on the projects page.

Moderation

This object is moderated, see the moderation section

How to configure it

Use the panel to access the website configuration page. You can change the description.

How to play with types and handlers

On TuxFamily, you can play with the types and handlers to modify how scripts are executed


The handlers are configured as follows:

Name of MIME type             Interpreter           Associated extensions
application/x-httpd-php5      /usr/bin/php5-cgi     .php .php3 .php4 .php5 .phtml
application/x-httpd-php7      /usr/bin/php-cgi7.3   .php7
application/x-httpd-perl      /usr/bin/perl         .pl
application/x-httpd-python    /usr/bin/python       .py
application/x-httpd-bash      /bin/bash             .sh
application/x-httpd-ruby      /usr/bin/ruby         .rb
application/x-httpd-eruby     /usr/bin/eruby        .rhtml
application/x-httpd-scheme    /usr/bin/csi          .scm .ss
application/x-httpd-self      self execution        .cgi       (using the script shebang)  

PHP7

In order to execute PHP7 instead of PHP5, edit/add a .htaccess file and add:

AddType application/x-httpd-php7 .php

Self-execution

How can I execute my perl through shebang? (example)

Please edit/add a .htaccess file and add:

AddType application/x-httpd-self .pl

How to manage permissions

There are two levels of permissions:

  • the access to the website configuration using ACL
  • the access to the files files of the website using the unix permissions(en):
$ ssh user@ssh.tuxfamily.org "chmod 755 group group/webarea.tuxfamily.org-web \
    group/webarea.tuxfamily.org-web/htdocs"

How to delete it

  • Log in on the panel
  • click on the group of your project
  • click on your website
  • click on delete

How to use it

How do I upload files on my website ?

  • the files are to be uploaded in the htdocs/ folder in your website folder on the FTP server (ftp.tuxfamily.org), SFTP server (sftp.tuxfamily.org), SSH server ( ssh.tuxfamily.org ). Your user name and password are the one you use to log on the panel. Also, you must activate a shell on your account before using SFTP or SSH. Imagine you have a group 'group' and the website webarea.tuxfamily.org, the files must be uploaded into group/webarea.tuxfamily.org-web/htdocs/ on the FTP, that can be accessed by rsync over SSH:
$ rsync -av ./webarea/ user@ssh.tuxfamily.org:group/webarea.tuxfamily.org-web/htdocs/
  • The folder of the website is in the your group's folder (which is in your starting folder on the FTP). It ends with the suffix "-web".
  • the tmp/ folder is used for temporary files of PHP as well as sessions.
  • DO NOT put your PHP scripts or ANY files in chmod 777. They won't execute anyway and it is a serious security issue!
  • the statistics of your website are available on http://stats.tuxfamily.org/YOURWEBSITE/. For example: http://stats.tuxfamily.org/faq.tuxfamily.org/
    • for this purpose, we use awstats; we hope that you'll like it.
  • if you get a 500 error:
"Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete          your request."

This may be due to a bad rights on your files: their writing right must NOT be 'other' (safety measure). You may do a chmod 775 on these files.

Please check also your .htaccess file, you are not able to use php flags on TuxFamily without having an Internal server error.

If you have a group with more than one contributor, please make sure that each person register on the panel to get a login. Then, just add them in your group and they will be able to upload files by ftp, using their own password.

Make sure that your FTP client handle symbolic links otherwise you won't be able to browse your projects. Of course, do not delete those symbolic links!

Copy files to download repository

You can access to your download repository from the web servers in the folder /data/repository, /data/repository/vhffs4 for the vhffs4 group for example.

However, you must not access this folder very often, it only needs to be used to upload file from the web service to your download repository, you should not read files on these repository and above all you must really not even consider one second to list the content of the folders. In other word, you should keep an index of uploaded files and provide URLs that look like http://download.tuxfamily.org/.../ to your visitors.

How to enable TLS/HTTPS?

You do not need to do anything, TLS certificates are generated once a day during the night through Let's Encrypt so during the first day you will not have a dedicated TLS certificate.

Once the certificate has been automatically generated you will see in the Web area administration:

TLS state
Global state: Valid

Expire: 10/12/2018 03:30:29 AM

Retries: 0

Domain list: www.forum.tuxfamily.org forum.tuxfamily.org

Tips and tricks

  • You HAVE TO upgrade the webapps you are using (wiki, CMS, blog, ...) in order to fix their numerous security issues. This is mandatory, we require that you do that. Not doing that (voluntarily or not) is considered disrespectful.
  • Do NOT put a 777 mode on one of yours php files. you can have security issues and it won't be loaded by our servers!
  • For a same project, you can have more than one website, for example, you can have a wiki and a forum and a support site... like:
    • forum.yoursite.tuxfamily.org
    • wiki.yoursite.tuxfamily.org
    • whatever.yourdomain.tld
  • If you just deleted your htdocs folder, come on our irc channel, an admin may be able to do something for you.
  • If you can't upload your files without error, you need more disk-space. Try sending a mail to the staff to get your quota enlarged :)
  • If you can't connect to our server, try using the passive mode (both work if your equipments are correctly configured on your side).
  • If you have troubles removing a directory, you may have some "hidden" files. Make sure that your ftp client display them.
  • If you want to use mod_rewrite in a .htaccess, start your .htaccess with:
RewriteEngine On
RewriteBase   /path/to/your/software  # ex: / if rules are applied on the root of your website, /forum , /wiki , ... in other cases

Compatibility with some third party applications

You'll find here a list of common problems reported by TuxFamily members with a page describing how to solve the problem when this is possible.

MediaWiki, "Your session save path appears to be invalid or is not writable" and "your database_username is too long".

Flyspray, "Paths and rights problems".

MoinMoin, "MoinMoin installation".

PHP on TuxFamily.

Python on TuxFamily.