<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">El 02/06/17 a les 08:02, Aniol Martí ha
escrit:<br>
</div>
<blockquote type="cite"
cite="mid:3c29e3cd-e03a-a9a9-4fe8-a2c2d96f63f6@caliu.cat">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="moz-cite-prefix">On 06/02/17 07:11, Joan Carles wrote:<br>
</div>
<blockquote type="cite"
cite="mid:fab77b00-dd13-50db-42c6-2cee85a22096@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
<div class="moz-cite-prefix">El 01/06/17 a les 23:52, Aniol
Martí ha escrit:<br>
</div>
<blockquote type="cite"
cite="mid:26b0284d-53a3-080f-8784-003648c80461@caliu.cat">
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
<div class="moz-cite-prefix">On 06/01/17 20:43, Joan Carles
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:00109450-bb2e-fda4-fca0-bb376ac9bb90@gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<p>Bona tarda!</p>
<p>Bo, com neòfit en informàtica, encara que molts anys fent
servir ubuntu em trobe amb un problema, que a veure si
podeu ajudar-me.</p>
<p>Estic fent un curs de edició i publicació pàgines
web(html5,css3, javascript), el tema que més m'interessa
surt quan hem de pasar els fitxers a un servidor local amb
php per penjar el darrer projecte i ver la web final
pública.</p>
<p>A classe treballem amb windows(Vista) i ens han fet
instal.lar, al pen on guardem la feina de cada dia, el
UsbServer i podem accedir, però a casa amb Ubuntu 16.04,
he seguit les passes que he trobat al web de</p>
<p><a class="moz-txt-link-freetext"
href="http://infinitubuntu.blogspot.com.es/2016/04/montar-servidor-web-ubuntu-16.04-lamp-php-mysql-apache2.html"
moz-do-not-send="true">http://infinitubuntu.blogspot.com.es/2016/04/montar-servidor-web-ubuntu-16.04-lamp-php-mysql-apache2.html</a></p>
<p>i cap problema a l'instal.lació però després no puc
llegir els fitxers php i realment no se per on surtir per
què el professor m'ha dit que ell amb temes de casa no pot
fer res (i ho veig lògic) i clar el temps que tinc
s'escurça i no puc fer feina a casa.</p>
<p>He trobat un <a moz-do-not-send="true"
href="https://www.virtualhere.com/usb_server_software">Linux
Usb Server</a> però no se si pot servir-me.</p>
<p>Potser us falta informació del que tinc al meu equip però
ara mateix no se quina proporcionar-vos.<br>
</p>
<p>Si algú pot donar-me un cop de mà o indicació possible,
s'agrairia.</p>
<p><br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Salutacions,
Joan Carles
Usuari GNU/Linux #324197#
<a class="moz-txt-link-freetext" href="http://counter.li.org/" moz-do-not-send="true">http://counter.li.org/</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<p>Hola Joan Carles,</p>
<p>Prova de crear el fitxer <b>info.php</b> al directori <b>/var/www/html
</b>del servidor web. El fitxer ha de contenir aquestes
línies: <br>
</p>
<pre><code><?php
// Show all information, defaults to INFO_ALL
phpinfo();
?></code>
</pre>
<p><br>
</p>
<p>Un cop fet, obre un navegador i accedeix a <a
class="moz-txt-link-freetext"
href="http://127.0.0.1/info.php" moz-do-not-send="true">http://127.0.0.1/info.php</a>
a veure què et surt.</p>
<p><br>
</p>
<p>Salut!</p>
<p><br>
</p>
<pre><code></code></pre>
<div class="moz-signature">-- <br>
<meta charset="UTF-8">
Aniol Martí gpg C6F0514F <br>
<a href="https://www.aniolmarti.cat" moz-do-not-send="true">http://www.aniolmarti.cat</a>
<br>
<br>
Linux Registered User #614499 <br>
__________________________________________ <br>
P Abans d'imprimir aquest correu pensa bé si és necessari
fer-ho. </div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<p>Hola!</p>
<p>Doncs em surt, que no puc accedir. Afegeixo captura pantalla
també.<br>
</p>
<pre class="moz-signature" cols="72">--
Salutacions,
Joan Carles
Usuari GNU/Linux #324197#
<a class="moz-txt-link-freetext" href="http://counter.li.org/" moz-do-not-send="true">http://counter.li.org/</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<p>Bon dia!</p>
<p>M'he mirat la guia que vas seguir i diria que ja veig d'on ve
el problema. A la guia et suggereixen que canviïs l'arrel del
servidor web a un directori del teu home (en aquest cas sitios).
Suposant que vas crear el directori "Sitios" dins del teu home
fes un "chown -R <ElTeuUsuari>:www-data
/home/ElTeuUsuari/Sitios". Per assegurar que les configuracions
estiguin bé, ens podries passar el contingut dels fitxers
/etc/apache2/apache2.conf i
/etc/apache2/sites-available/000-default.conf ? Per fer-ho, et
suggereixo que utilitzis una eina com l'etherpad de Mozilla [0].<br>
</p>
<p><br>
</p>
<p>[0]: <a class="moz-txt-link-freetext"
href="https://public.etherpad-mozilla.org/"
moz-do-not-send="true">https://public.etherpad-mozilla.org/</a></p>
<p><br>
</p>
<p>Salut!</p>
<p><br>
</p>
<div class="moz-signature">-- <br>
<meta charset="UTF-8">
Aniol Martí gpg C6F0514F <br>
<a href="https://www.aniolmarti.cat" moz-do-not-send="true">http://www.aniolmarti.cat</a>
<br>
<br>
Linux Registered User #614499 <br>
__________________________________________ <br>
P Abans d'imprimir aquest correu pensa bé si és necessari
fer-ho. </div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<p>Hola!</p>
<p>Si ho faig amb l'eina que dius. No em deixa:</p>
<p><span style="color: rgb(0, 0, 0); font-family: "Times New
Roman"; font-size: medium; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial; display: inline !important;
float: none;">Cannot GET
/p//etc/apache2/sites-available/000-default.conf
i </span>Cannot GET /p//etc/apache2/apache2.conf <br>
</p>
<p>No se per què se li posa una p, quan he mirat i no tenia cap
espai davant. Per tant t'envie el contingut dels fitxers a qui
sota.</p>
<p>Del segon:</p>
<p># This is the main Apache server configuration file. It contains
the<br>
# configuration directives that give the server its instructions.<br>
# See <a class="moz-txt-link-freetext" href="http://httpd.apache.org/docs/2.4/">http://httpd.apache.org/docs/2.4/</a> for detailed information
about<br>
# the directives and /usr/share/doc/apache2/README.Debian about
Debian specific<br>
# hints.<br>
#<br>
#<br>
# Summary of how the Apache 2 configuration works in Debian:<br>
# The Apache 2 web server configuration in Debian is quite
different to<br>
# upstream's suggested way to configure the web server. This is
because Debian's<br>
# default Apache2 installation attempts to make adding and
removing modules,<br>
# virtual hosts, and extra configuration directives as flexible as
possible, in<br>
# order to make automating the changes and administering the
server as easy as<br>
# possible.<br>
<br>
# It is split into several files forming the configuration
hierarchy outlined<br>
# below, all located in the /etc/apache2/ directory:<br>
#<br>
# /etc/apache2/<br>
# |-- apache2.conf<br>
# | `-- ports.conf<br>
# |-- mods-enabled<br>
# | |-- *.load<br>
# | `-- *.conf<br>
# |-- conf-enabled<br>
# | `-- *.conf<br>
# `-- sites-enabled<br>
# `-- *.conf<br>
#<br>
#<br>
# * apache2.conf is the main configuration file (this file). It
puts the pieces<br>
# together by including all remaining configuration files when
starting up the<br>
# web server.<br>
#<br>
# * ports.conf is always included from the main configuration
file. It is<br>
# supposed to determine listening ports for incoming connections
which can be<br>
# customized anytime.<br>
#<br>
# * Configuration files in the mods-enabled/, conf-enabled/ and
sites-enabled/<br>
# directories contain particular configuration snippets which
manage modules,<br>
# global configuration fragments, or virtual host
configurations,<br>
# respectively.<br>
#<br>
# They are activated by symlinking available configuration files
from their<br>
# respective *-available/ counterparts. These should be managed
by using our<br>
# helpers a2enmod/a2dismod, a2ensite/a2dissite and
a2enconf/a2disconf. See<br>
# their respective man pages for detailed information.<br>
#<br>
# * The binary is called apache2. Due to the use of environment
variables, in<br>
# the default configuration, apache2 needs to be started/stopped
with<br>
# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2
directly will not<br>
# work with the default configuration.<br>
<br>
<br>
# Global configuration<br>
#<br>
<br>
#<br>
# ServerRoot: The top of the directory tree under which the
server's<br>
# configuration, error, and log files are kept.<br>
#<br>
# NOTE! If you intend to place this on an NFS (or otherwise
network)<br>
# mounted filesystem then please read the Mutex documentation
(available<br>
# at
<a class="moz-txt-link-rfc1738" href="http://httpd.apache.org/docs/2.4/mod/core.html#mutex"><URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex></a>);<br>
# you will save yourself a lot of trouble.<br>
#<br>
# Do NOT add a slash at the end of the directory path.<br>
#<br>
#ServerRoot "/etc/apache2"<br>
<br>
#<br>
# The accept serialization lock file MUST BE STORED ON A LOCAL
DISK.<br>
#<br>
#Mutex <a class="moz-txt-link-freetext" href="file:$">file:$</a>{APACHE_LOCK_DIR} default<br>
<br>
#<br>
# The directory where shm and other runtime files will be stored.<br>
#<br>
<br>
DefaultRuntimeDir ${APACHE_RUN_DIR}<br>
<br>
#<br>
# PidFile: The file in which the server should record its process<br>
# identification number when it starts.<br>
# This needs to be set in /etc/apache2/envvars<br>
#<br>
PidFile ${APACHE_PID_FILE}<br>
<br>
#<br>
# Timeout: The number of seconds before receives and sends time
out.<br>
#<br>
Timeout 300<br>
<br>
#<br>
# KeepAlive: Whether or not to allow persistent connections (more
than<br>
# one request per connection). Set to "Off" to deactivate.<br>
#<br>
KeepAlive On<br>
<br>
#<br>
# MaxKeepAliveRequests: The maximum number of requests to allow<br>
# during a persistent connection. Set to 0 to allow an unlimited
amount.<br>
# We recommend you leave this number high, for maximum
performance.<br>
#<br>
MaxKeepAliveRequests 100<br>
<br>
#<br>
# KeepAliveTimeout: Number of seconds to wait for the next request
from the<br>
# same client on the same connection.<br>
#<br>
KeepAliveTimeout 5<br>
<br>
<br>
# These need to be set in /etc/apache2/envvars<br>
User ${APACHE_RUN_USER}<br>
Group ${APACHE_RUN_GROUP}<br>
<br>
#<br>
# HostnameLookups: Log the names of clients or just their IP
addresses<br>
# e.g., <a class="moz-txt-link-abbreviated" href="http://www.apache.org">www.apache.org</a> (on) or 204.62.129.132 (off).<br>
# The default is off because it'd be overall better for the net if
people<br>
# had to knowingly turn this feature on, since enabling it means
that<br>
# each client request will result in AT LEAST one lookup request
to the<br>
# nameserver.<br>
#<br>
HostnameLookups Off<br>
<br>
# ErrorLog: The location of the error log file.<br>
# If you do not specify an ErrorLog directive within a
<VirtualHost><br>
# container, error messages relating to that virtual host will be<br>
# logged here. If you *do* define an error logfile for a
<VirtualHost><br>
# container, that host's errors will be logged there and not here.<br>
#<br>
ErrorLog ${APACHE_LOG_DIR}/error.log<br>
<br>
#<br>
# LogLevel: Control the severity of messages logged to the
error_log.<br>
# Available values: trace8, ..., trace1, debug, info, notice,
warn,<br>
# error, crit, alert, emerg.<br>
# It is also possible to configure the log level for particular
modules, e.g.<br>
# "LogLevel info ssl:warn"<br>
#<br>
LogLevel warn<br>
<br>
# Include module configuration:<br>
IncludeOptional mods-enabled/*.load<br>
IncludeOptional mods-enabled/*.conf<br>
<br>
# Include list of ports to listen on<br>
Include ports.conf<br>
<br>
<br>
# Sets the default security model of the Apache2 HTTPD server. It
does<br>
# not allow access to the root filesystem outside of /usr/share
and /var/www.<br>
# The former is used by web applications packaged in Debian,<br>
# the latter may be used for local directories served by the web
server. If<br>
# your system is serving content from a sub-directory in /srv you
must allow<br>
# access here, or in any related virtual host.<br>
<Directory /><br>
Options FollowSymLinks<br>
AllowOverride None<br>
Require all denied<br>
</Directory><br>
<br>
<Directory /usr/share><br>
AllowOverride None<br>
Require all granted<br>
</Directory><br>
<br>
<Directory /home/$HOME/Sitios><br>
Options Indexes FollowSymLinks<br>
AllowOverride None<br>
Require all granted<br>
</Directory><br>
<br>
#<Directory /srv/><br>
# Options Indexes FollowSymLinks<br>
# AllowOverride None<br>
# Require all granted<br>
#</Directory><br>
<br>
<br>
<br>
<br>
# AccessFileName: The name of the file to look for in each
directory<br>
# for additional configuration directives. See also the
AllowOverride<br>
# directive.<br>
#<br>
AccessFileName .htaccess<br>
<br>
#<br>
# The following lines prevent .htaccess and .htpasswd files from
being<br>
# viewed by Web clients.<br>
#<br>
<FilesMatch "^\.ht"><br>
Require all denied<br>
</FilesMatch><br>
<br>
<br>
#<br>
# The following directives define some format nicknames for use
with<br>
# a CustomLog directive.<br>
#<br>
# These deviate from the Common Log Format definitions in that
they use %O<br>
# (the actual bytes sent including headers) instead of %b (the
size of the<br>
# requested file), because the latter makes it impossible to
detect partial<br>
# requests.<br>
#<br>
# Note that the use of %{X-Forwarded-For}i instead of %h is not
recommended.<br>
# Use mod_remoteip instead.<br>
#<br>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\"
\"%{User-Agent}i\"" vhost_combined<br>
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\"
\"%{User-Agent}i\"" combined<br>
LogFormat "%h %l %u %t \"%r\" %>s %O" common<br>
LogFormat "%{Referer}i -> %U" referer<br>
LogFormat "%{User-agent}i" agent<br>
<br>
# Include of directories ignores editors' and dpkg's backup files,<br>
# see README.Debian for details.<br>
<br>
# Include generic snippets of statements<br>
IncludeOptional conf-enabled/*.conf<br>
<br>
# Include the virtual host configurations:<br>
IncludeOptional sites-enabled/*.conf<br>
<br>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet</p>
<p><br>
</p>
<p>--------------------------</p>
<p>del primer:</p>
<p><VirtualHost *:80><br>
# The ServerName directive sets the request scheme, hostname
and port that<br>
# the server uses to identify itself. This is used when
creating<br>
# redirection URLs. In the context of virtual hosts, the
ServerName<br>
# specifies what hostname must appear in the request's Host:
header to<br>
# match this virtual host. For the default virtual host (this
file) this<br>
# value is not decisive as it is used as a last resort host
regardless.<br>
# However, you must set it for any further virtual host
explicitly.<br>
#ServerName <a class="moz-txt-link-abbreviated" href="http://www.example.com">www.example.com</a><br>
<br>
ServerAdmin webmaster@localhost<br>
DocumentRoot /home/$HOME/Sitios<br>
<br>
# Available loglevels: trace8, ..., trace1, debug, info,
notice, warn,<br>
# error, crit, alert, emerg.<br>
# It is also possible to configure the loglevel for particular<br>
# modules, e.g.<br>
#LogLevel info ssl:warn<br>
<br>
ErrorLog ${APACHE_LOG_DIR}/error.log<br>
CustomLog ${APACHE_LOG_DIR}/access.log combined<br>
<br>
# For most configuration files from conf-available/, which are<br>
# enabled or disabled at a global level, it is possible to<br>
# include a line for only one particular virtual host. For
example the<br>
# following line enables the CGI configuration for this host
only<br>
# after it has been globally disabled with "a2disconf".<br>
#Include conf-available/serve-cgi-bin.conf<br>
</VirtualHost><br>
<br>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet</p>
<p>----------------------------</p>
<p>Ja diràs.</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Salutacions,
Joan Carles
Usuari GNU/Linux #324197#
<a class="moz-txt-link-freetext" href="http://counter.li.org/">http://counter.li.org/</a>
</pre>
</body>
</html>