Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/07/2011, 12:17
Avatar de manyblue
manyblue
 
Fecha de Ingreso: marzo-2008
Mensajes: 329
Antigüedad: 16 años, 1 mes
Puntos: 10
Problema Ubuntu Lamp php

En primer lugar saludar a todos.
Si no es el foro pertinente pido disculpas de antemano y trasladarlo pofavor.

Tengo en Ubuntu 11.04 Natty Narwhal instalado:
LampServer (apache22 + php5 + extensiones extra de php + phpmyadmin) + vsftpd + denyhost + ntop

Todo corre a la perfeccion en teoria.

tengo dos problemas o dudas:

Como puedo redirigir otro dominio al mismo server ??
Creo que puede ser como crear en /etc/apache2/site-available y en /etc/apache2/site-enable otro documento llamado de la manera que quiera y copia de /etc/apache2/saites-available/sample.
Mi sample actual es:

<VirtualHost 192.168.1.35:80>
ServerAdmin [email protected]

DocumentRoot /var/www
DirectoryIndex index.php index.html index.htm
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

pero como sabe apache que dominio redirigir ????

Seria especificar el ServerName como sigue ?????

<VirtualHost 192.168.1.35:80>
ServerAdmin [email protected]
ServerName http://www.xxxxxxxx.com

DocumentRoot /var/www
DirectoryIndex index.php index.html index.htm
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>


En mi apache2/conf no existia fqdn pero lo cree.
# nano /etc/apache2/conf/fqdn
ServerName localhost

Otra cosa es que lo he probado todo y va bien pero tengo un problema para mandar los formularios y email de confirmacion de registros etc.
He instalado por ejemplo Gallery3 y no se reciben los email de confirmacion de registro ni los formularios y creo que tiene que ver con la funcion mail de php.
No se como resolverlo asi que agradeceria enormemente AYUDA.

he recalado en Ubuntu hace 1 mes pues venia de FreeBSD de hecho tengo otro server con freeBSD apache mysql php denyhost vsftpd ntop corriendo a la perfeccion y me manda los email y los formularios bien sin problema solo que el remitente es wwwo es decir world wide web owner y eso lo hace php pues no tengo mail server instalado.
En freeBSD my php.ini esta en:
/usr/local/etc/php.ini y la parte de mail es:


[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = [email protected]

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameter
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =


En Ubuntu php.ini esta en:
/etc/php5/apache2/php.ini y es:

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = [email protected]

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On

; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =


Creo que casi igual, tengo que variar algo aqui para que me envie los email de confirmacion de registros y los formulario con get y post ????
En este ubuntu esta instalado Mocilla Thunderbird y Empaty creo que es que viene con la instalacio, pero no hay instalado un servidor de correo especifico como Postfix

Muchisimas gracias de antemano y cinceramente necesitaria resolver estos dos problemas para dejar zanjado el tema de la copia del server freeBSD pero en Ubuntu.

Un saludo: Manyblue

PD: Lo tengo posteado desde hace unos dias en tres foros mas sin respuesta.