<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hola!</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Ara posant el fitxers a la carpeta var/www/html, sí puc obrir els fitxers php. </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Moltes gràcies.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-03 19:22 GMT+02:00 Joan Carles <span dir="ltr"><<a href="mailto:palimsesto@gmail.com" target="_blank">palimsesto@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hola!</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Fet i sí aparex. Mira imatge</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2017-06-02 20:47 GMT+02:00 Aniol Martí <span dir="ltr"><<a href="mailto:amarti@caliu.cat" target="_blank">amarti@caliu.cat</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div text="#000000" bgcolor="#FFFFFF"><div><div class="m_8727857687416212966h5">
<div class="m_8727857687416212966m_-289537501969184489moz-cite-prefix">On 06/02/17 18:14, Joan Carles wrote:<br>
</div>
<blockquote type="cite">
<div class="m_8727857687416212966m_-289537501969184489moz-cite-prefix">El 02/06/17 a les 08:02, Aniol Martí
ha escrit:<br>
</div>
<blockquote type="cite">
<div class="m_8727857687416212966m_-289537501969184489moz-cite-prefix">On 06/02/17 07:11, Joan Carles
wrote:<br>
</div>
<blockquote type="cite">
<div class="m_8727857687416212966m_-289537501969184489moz-cite-prefix">El 01/06/17 a les 23:52, Aniol
Martí ha escrit:<br>
</div>
<blockquote type="cite">
<div class="m_8727857687416212966m_-289537501969184489moz-cite-prefix">On 06/01/17 20:43, Joan Carles
wrote:<br>
</div>
<blockquote type="cite">
<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="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext" href="http://infinitubuntu.blogspot.com.es/2016/04/montar-servidor-web-ubuntu-16.04-lamp-php-mysql-apache2.html" target="_blank">http://infinitubuntu.blogspot.<wbr>com.es/2016/04/montar-servidor<wbr>-web-ubuntu-16.04-lamp-php-<wbr>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 href="https://www.virtualhere.com/usb_server_software" target="_blank">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="m_8727857687416212966m_-289537501969184489moz-signature" cols="72">--
Salutacions,
Joan Carles
Usuari GNU/Linux #324197#
<a class="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext" href="http://counter.li.org/" target="_blank">http://counter.li.org/</a>
</pre>
<br>
<fieldset class="m_8727857687416212966m_-289537501969184489mimeAttachmentHeader"></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="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext" href="http://127.0.0.1/info.php" target="_blank">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="m_8727857687416212966m_-289537501969184489moz-signature">-- <br>
Aniol Martí gpg C6F0514F <br>
<a href="https://www.aniolmarti.cat" target="_blank">http://www.aniolmarti.cat</a> <br>
<br>
Linux Registered User #614499 <br>
______________________________<wbr>____________ <br>
P Abans d'imprimir aquest correu pensa bé si és necessari
fer-ho. </div>
<br>
<fieldset class="m_8727857687416212966m_-289537501969184489mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<p>Hola!</p>
<p>Doncs em surt, que no puc accedir. Afegeixo captura
pantalla també.<br>
</p>
<pre class="m_8727857687416212966m_-289537501969184489moz-signature" cols="72">--
Salutacions,
Joan Carles
Usuari GNU/Linux #324197#
<a class="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext" href="http://counter.li.org/" target="_blank">http://counter.li.org/</a>
</pre>
<br>
<fieldset class="m_8727857687416212966m_-289537501969184489mimeAttachmentHeader"></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/0<wbr>00-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="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext" href="https://public.etherpad-mozilla.org/" target="_blank">https://public.etherpad-mozill<wbr>a.org/</a></p>
<p><br>
</p>
<p>Salut!</p>
<p><br>
</p>
<div class="m_8727857687416212966m_-289537501969184489moz-signature">-- <br>
Aniol Martí gpg C6F0514F <br>
<a href="https://www.aniolmarti.cat" target="_blank">http://www.aniolmarti.cat</a>
<br>
<br>
Linux Registered User #614499 <br>
______________________________<wbr>____________ <br>
P Abans d'imprimir aquest correu pensa bé si és necessari
fer-ho. </div>
<br>
<fieldset class="m_8727857687416212966m_-289537501969184489mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<p>Hola!</p>
<p>Si ho faig amb l'eina que dius. No em deixa:</p>
<p><span>Cannot GET
/p//etc/apache2/sites-availabl<wbr>e/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="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext" href="http://httpd.apache.org/docs/2.4/" target="_blank">http://httpd.apache.org/docs/2<wbr>.4/</a>
for detailed information about<br>
# the directives and /usr/share/doc/apache2/README.<wbr>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="m_8727857687416212966m_-289537501969184489moz-txt-link-rfc1738" href="http://httpd.apache.org/docs/2.4/mod/core.html#mutex" target="_blank"><URL:http://httpd.apache.org/d<wbr>ocs/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="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext">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="m_8727857687416212966m_-289537501969184489moz-txt-link-abbreviated" href="http://www.apache.org" target="_blank">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="m_8727857687416212966m_-289537501969184489moz-txt-link-abbreviated" href="http://www.example.com" target="_blank">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.c<wbr>onf<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="m_8727857687416212966m_-289537501969184489moz-signature" cols="72">--
Salutacions,
Joan Carles
Usuari GNU/Linux #324197#
<a class="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext" href="http://counter.li.org/" target="_blank">http://counter.li.org/</a>
</pre>
</blockquote>
</div></div><p>Bones!</p>
<p>Amb l'eina aquella em referia que copiessis el contingut dels
fitxers allà, així no hi ha tanta parrafada a les llistes.<br>
</p>
<p>Doncs per evitar problemes fem un canvi fàcil. Als dos fitxers
canvia la "/home/$HOME/Sitios" per "/var/www/html". Després,
reinicia l'Apache fent "sudo service apache2 restart". Un cop fet,
torna a provar d'accedir a <a class="m_8727857687416212966m_-289537501969184489moz-txt-link-freetext" href="http://127.0.0.1/info.php" target="_blank">http://127.0.0.1/info.php</a></p>
<p><br>
</p>
<p>Ja ens diràs!</p><span>
<p><br>
</p>
<div class="m_8727857687416212966m_-289537501969184489moz-signature">-- <br>
Aniol Martí gpg C6F0514F
<br>
<a href="https://www.aniolmarti.cat" target="_blank">http://www.aniolmarti.cat</a>
<br>
<br>
Linux Registered User #614499
<br>
______________________________<wbr>____________
<br>
P Abans d'imprimir aquest correu pensa bé si és necessari fer-ho.
</div>
</span></div>
<br></div></div><span class="">--<br>
Ubuntu-cat mailing list<br>
<a href="mailto:Ubuntu-cat@lists.ubuntu.com" target="_blank">Ubuntu-cat@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-cat" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/ubuntu-cat</a><br>
<br></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_8727857687416212966gmail_signature" data-smartmail="gmail_signature">Joan Carles<br>Usuari GNU/Linux #324197</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Joan Carles<br>Usuari GNU/Linux #324197</div>
</div>