Logo Khaganat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:lamp [2016/12/20 13:06] – [Editing urls to go to folders (alias)] Domperssen:lamp [2021/12/03 18:19] (current) – external edit 127.0.0.1
Line 70: Line 70:
  
 ==== Rights on www ==== ==== Rights on www ====
-Several possibilities to allow, as user Lambda((yes, our test user is called "Lambda".)), To modify what is in the folder /var/www. +There are several possibilities to allow our user "Lambda"((yes, our test user is called "Lambda".)) to modify what'in the folder /var/www. 
-The easiest and fastest way is to assign the rights of this folder to the www-data group, and to put lambda in the www-data group.+The easiest and fastest way is to assign the rights of this folder to the www-data group, and then put lambda in that www-data group.
  
    Sudo adduser lambda www-data    Sudo adduser lambda www-data
Line 81: Line 81:
    Usermod -a -G www-data lambda    Usermod -a -G www-data lambda
      
-Both are similar.+Both commands do the job!
 </WRAP> </WRAP>
  
-Restart the session so that the rights are taken into account for the current user.+Restart the session so that Apache can take the rights into account for the current user.
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-It's better to let the www-data group manage the rights, basic, because otherwise it'a nice bazaar.Adding the user "lambda" in this group makes it possible to modify everything without taking the lead.+It's better to let the www-data group manage the rights, basically because otherwise it'an open bazaar. Adding the user "lambda" in this group makes it possible to modify everything without taking the lead.
  
-Security would probably like that www-data does not have the rights, but it requires to understand everything, otherwise apache will just block everything. So here, make it simple.+From a security perspective, maybe www-data shouldn'have these kind of rights, but(at the same time) it requires it to be able to understand everything, otherwise Apache will just block everything.. so let's keep it simple!
 </WRAP> </WRAP>
  
-If some cms cause problems, the following command sequence on the folder in question can reassign the rights to www-data and allow them to be resolved(to run as root):+If some cms causes problems, the following command sequence(on the folder in questioncan reassign the rights to www-data and allow them to be resolved(Run these as root):
   chgrp -R www-data "folder"   chgrp -R www-data "folder"
   chown -R www-data "folder"   chown -R www-data "folder"
Line 98: Line 98:
      
  
-''chgrp'' to reassign the owner group, ''chown'' to change the owner anyway(less important, in theory chgrp should already fix most of the worries), ''chmod'' to give the right permissions //write// on the folder // ''// //add //, // ''w'' for //write//, so //write//). The ''-R'' option allows recursion(that the change applies in subfolders).+''chgrp'' to reassign the owner group, ''chown'' to change the owner anyway(less important, in theory chgrp should already fix most of the worries), ''chmod'' to give the right permissions //write// on the folder//add//, ''w'' for //write//, so //write//). The ''-R'' option allows recursion(so the change applies to subfolders).
  
 ==== Proxy ==== ==== Proxy ====
 Some services are accessible via specific ports. This is what [[pad|Etherpad]] does for example: when installed, it is accessible at the address ''http://myserverur.com:9001''. Some services are accessible via specific ports. This is what [[pad|Etherpad]] does for example: when installed, it is accessible at the address ''http://myserverur.com:9001''.
  
-To be able to access it via the web address ''http://monserverur.com/pad'', you must put a proxy in place in Apache.+To be able to access it via the web address ''http://monserverur.com/pad'', you must use the proxy option in Apache.
  
 Begin by activating the proxy modules: Begin by activating the proxy modules:
    A2enmod proxy proxy_http    A2enmod proxy proxy_http
    
-Then add this kind of information in ''/etc/apache2/sites-availables/000-default.conf'':+Then add this information in ''/etc/apache2/sites-availables/000-default.conf'':
 <code> <code>
 <VirtualHost *:80> <VirtualHost *:80>
Line 129: Line 129:
    Service apache2 restart    Service apache2 restart
      
-Your etherpad should be accessible at the right address!+Your etherpad should now be accessible at the right address!
 ===== Mysql ===== ===== Mysql =====
 ==== Phpmyadmin ==== ==== Phpmyadmin ====
 === Installation === === Installation ===
  
-Phpmyadmin is considered a potential security breach and would be better off. At the same time, going without database would be ideal ...+Phpmyadmin is considered as program with high potential security breaches.. and you would be better off without itBut at the same time, going without database would be ideal... 
 + 
 +In short, despite these considerations, phpmyadmin is a handy way to manage a database when you have little knowledge, because it helps you do the job well. So... we'll try to install it. 
 + 
 +**OBS: MySQL Workbench would be a better solution,  "all in all"!!**
  
-In short, despite these considerations, phpmyadmin is a handy way to manage a database when you have little knowledge, because it helps the job well. So ... we'll try to install it. 
  
    Sudo apt-get install phpmyadmin    Sudo apt-get install phpmyadmin
  
-Select "apache" in the options, then for the database, let it do it.+Select "apache" in the options, then for the database, let the process complete.
  
 <code> Please enter the password for the administrative account that will be used to create the MySQL database as well as the users. <code> Please enter the password for the administrative account that will be used to create the MySQL database as well as the users.
Line 146: Line 149:
 This is the root password. This is the root password.
      
-Choose the password of the database ... and do not forget to pass it in a secured way to the other admins.+Choose the database password... and do not forget to pass it in a "secure wayto the other admins.
  
 === Web location === === Web location ===
  
-By default, phpmyadmin is accessible at ''site.net/phpmyadmin'', which helps a malicious user find the door. It can be modified via the file ''/etc/apache2/conf.d/phpmyadmin.conf'', changing the default alias:+By default, phpmyadmin is accessible at ''site.net/phpmyadmin'', which helps a malicious user find the door. It can be modified via the file ''/etc/apache2/conf.d/phpmyadmin.conf'', You can change the default alias like this:
    Alias/phpmyadmin/usr/share/phpmyadmin    Alias/phpmyadmin/usr/share/phpmyadmin
 For example: For example:
Line 160: Line 163:
 <WRAP center round important 60%> <WRAP center round important 60%>
 Having a login other than "root" would be as good. But can it be easily changed? Having a login other than "root" would be as good. But can it be easily changed?
 +
 +**OBS: It's pretty bad to use ROOT as the database login. A better way is to make a user and select the rights accordingly!!** 
 </WRAP> </WRAP>
  
  
 === Importing a database === === Importing a database ===
-To import a database via phpmyadmin(eg forum forum, saved before), you must create the database, associate it with a user who will have access on this database only, then import the saved ".sql".+To import a database via phpmyadmin(for ex: forum backups ), you must create the database, associate it with a user who is the only one having access to the database, then lastly import the saved ".sql".
  
-If the base is too large, there will be an errorChange /etc/php5/apache2/php.ini to increase the maximum size allowed. Phpmyadmin makes an error linking what needs to be changed.+If the database is too large, there will be errorsOne fix is to change /etc/php5/apache2/php.ini to increase the maximum size allowed. The phpmyadmin program makes error linking(so you can see what needs to be changed).
  
 ==== Various Mysql commands ==== ==== Various Mysql commands ====
Line 179: Line 184:
    Mysql> create database MyDatabase;    Mysql> create database MyDatabase;
  
-3) Create a user and grant him access rights to the database without a password but only locally:+3) Create a user and grant him access rights to the database without a password **but only locally**:
    Mysql> GRANT ALL ON MyDatabase. * TO User @ localhost;    Mysql> GRANT ALL ON MyDatabase. * TO User @ localhost;
  
CC Attribution-Share Alike 4.0 International Driven by DokuWiki
en/lamp.1482239181.txt.gz · Last modified: (external edit)

Licences Mentions légales Accueil du site Contact Inclusion