background preloader

VirtualHost Examples

VirtualHost Examples
This document attempts to answer the commonly-asked questions about setting up virtual hosts. These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts. Running several name-based web sites on a single IP address. Your server has multiple hostnames that resolve to a single address, and you want to respond differently for www.example.com and www.example.org. Note Creating virtual host configurations on your Apache server does not magically cause DNS entries to be created for those host names. # Ensure that Apache listens on port 80Listen 80<VirtualHost *:80> DocumentRoot "/www/example1" ServerName www.example.com # Other directives here</VirtualHost><VirtualHost *:80> DocumentRoot "/www/example2" ServerName www.example.org # Other directives here</VirtualHost> The asterisks match all addresses, so the main server serves no requests. You may replace * with a specific IP address on the system. The server has two IP addresses. Related:  ProgrammingStuff

Hosting multiple websites with Apache2 Posted by Steve on Thu 6 Jul 2006 at 22:03 One of the most common Apache2 questions I've seen on Debian mailing lists is from users who wonder how to host multiple websites with a single server. This is very straightforward, especially with the additional tools the Debian package provides. We've previously discussed some of the tools which are included in the Apache2 package , but what we didn't do was show they're used from start to finish. There are many different ways you can configure Apache to host multiple sites, ranging from the simple to the complex. Here we're only going to cover the basics with the use of the NameVirtualHost directive. For example if you have an Apache server running upon the IP address 192.168.1.1 and you wish to host the three sites example.com , example.net , and example.org you'll need to make sure that these names resolve to the IP address of your server. (This might mean that you need example.com and www.example.com to resolve to the same address.

SMTP de Gmail depuis un CMS (eZPublish, Wordpress...) » Linux De nombreux CMS proposent d'envoyer les emails depuis un serveur smtp, c'est notamment le cas d'eZPublish (c'est aussi vrai pour la majorité, comme Wordpress, Joomla, Drupal etc.), on est souvent bloqué pour l'envoi de mail lorsque les mail du domaine sont gérés par Gmail avec Google Apps. Une solution élégante consiste à installer un tunnel SSL, pour envoyer les infos au serveur SMTP de Google. Nous avons notre bonheur avec stunnel. Installation de stunnel sous Debian Lancer tout d'abord l'installation apt-get install stunnel4 Ensuite, pour autoriser stunnel à démarrer, ouvrez le fichier de conf de stunnel : vim /etc/default/stunnel.conf Et mettez la valeur 1 à ENABLED : # /etc/default/stunnel# Julien LEMOINE <speedblue@debian.org># September 2003 # Change to one to enable stunnel ENABLED=1 FILES="/etc/stunnel/*.conf" OPTIONS="" # Change to one to enable ppp restart scripts PPP_RESTART=0 Ok, maintenant configurons notre tunnel. Configuration SMTP Google vim /etc/stunnel/googleapps.conf

Hébergement cloud - Serveurs dédiés flexibles en infrastructure cloud Language choice 10GB to 1TB of storage up to 5M pageviews Up to 100 domains unlimited databases Datacenter choice: USA or Europe PaaS? Platform as a Service means that you create your hosting environment by simply choosing the services that you want. Power and limitations You no longer need to worry about having enough power for your website! Instance Families Choose the type of configuration that you want (PHP, Node.Js, or Python) and the desired database (MySQL, pgSQL, mongoDB), and you will have a dedicated instance that is ready to use. Flexibility You can use your personal cloud hosting space for just one day, or for a whole year if you want, the choice is yours! Starting with the M pack, you can easily set up a secure address. Multiple access Update your instance by SFTP, access your instance by SSH console, or publish your code via GIT: you are free to choose your preferred method.

Name-based Virtual Host Support This document describes when and how to use name-based virtual hosts. Name-based vs. IP-based Virtual Hosts IP-based virtual hosts use the IP address of the connection to determine the correct virtual host to serve. Therefore you need to have a separate IP address for each host. With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Name-based virtual hosting is usually simpler, since you need only configure your DNS server to map each hostname to the correct IP address and then configure the Apache HTTP Server to recognize the different hostnames. Name-based virtual hosting builds off of the IP-based virtual host selection algorithm, meaning that searches for the proper server name occur only between virtual hosts that have the best IP-based address. How the server selects the proper name-based virtual host It is important to recognize that the first step in name-based virtual host resolution is IP-based resolution.

Tutorial: Créer un serveur web complet sous debian - #5 Backup & Sécurité Voici un nouveau tutorial qui vous sera sans doute utile si vous venez d'installer la distribution linux Debian (Ou Ubuntu) sur votre serveur. Introduction Objectif de ce tutorial L'objectif du tutorial est d'obtenir un serveur linux debian permettant d'héberger et de gérer vos sites web PHP / MySQL à distance, uniquement avec un accès SSH. Voici les différentes parties du tutorial qui seront divisées en 5 billets: Pré requis Pour réaliser ce tutorial, vous devrez au préalable avoir des connaissances en ligne de commande linux (Au moins les commandes basiques: cd, mkdir, mv ...). Disposer d'un client SSH (Comme Putty), d'un client FTP (Comme FileZilla), et bien sûr de votre serveur avec une Debian fraichement installée. Vous aurez aussi besoin d'au moins un nom de domaine pointant sur votre serveur. Installation du script de Backup Nous allons mettre en place 2 types de backup: Nous allons voir comment installer et configurer Backup Manager. root [~] > apt-get install perl gettext backup-manager #!

Tutoriel sur les serveurs La commande ifconfig permet la configuration locale ou à distance des interfaces réseau de tous types d'équipements (unité centrale, routeur). Sans paramètres, la commande ifconfig permet d'afficher les paramètres réseau des interfaces. La ligne de commande est : ifconfig interface adresse [parametres]. Exemple : ifconfig eth0 192.168.1.2 (affecte l'adresse 192.168.1.2 à la première interface physique). Voici les principaux arguments utilisés : interface logique ou physique, il est obligatoire, up active l'interface down désactive l'interface mtu définit l'unité de transfert des paquets netmask affecter un masque de sous-réseau broadcast définit l'adresse de broadcast arp ou -arp activer ou désactiver l'utilisation du cache arp de l'interface metric paramètre utilisé pour l'établissement des routes dynamiques, et déterminer le “ coût ” (nombre de sauts ou “ hops ”) d'un chemin par le protocole RIP. multicast active ou non la communication avec des machines qui sont hors du réseau. Explications : ?

patricio gomez » Blog Archive » Configurando django y apache con mod_wsgi en ubuntu Esta es una receta sencilla de cómo configurar desplegar aplicaciones django en apache usando mod_wsgi, ya que mod_python está desaconsejado y en versiones próximas de django no va a estar soportado. Ahora vamos a hacer dos configuraciones, una simplemente para ver que ande mod_wsgi y la otra para que haga andar nuestro proyecto. Creamos un servidor de prueba Empezamos con la configuración para verificar que esté andando mod_wsgi. Comenzamos instalando mod-wsgi para apahce. patricio@plg:~$ sudo apt-get install libapache2-mod-wsgi Creamos el directorio donde alojar el proyecto de pruebas /home/patricio/dev/django/test/ En ese directorio creamos el archivo app.wsgi con la respuesta http para probar que funciona el mod_wsgi def application(environ, start_response): status = '200 OK' output = 'Hello World!' Editamos el arcivo /etc/hosts para que resuelva nuestra petición agregando estas líneas 127.0.1.1 djangoserver 127.0.1.1 test.djangoserver Ahora creamos un host virtual llamado test-wsgi:

kimsufi mot de passe perdu perte de mot de passe, non? pas possible !! Pas de panique, une fois que vous aurez essayé vos dix milles mots de passe allez faire un petit tour sur le mode rescue du manager OVH... ( la doc ici ) Attention cette manipulation est à faire seulement si vous êtes familiarisé un minimum avec les commandes linux ... 1: aller dans le manager ovh services et passez en mode rescue-pro, vous recevrez les identifiants de connexion par mail MANAGER services -> netboot = rescue-pro 2:faites un reboot du serveur (pour que le mode rescue-pro soit fonctionnel) MANAGER services -> rebooter 3:connectez vous au serveur en ssh, montez les disques fdisk -l mount /dev/sda1 /mnt/ mount /dev/sda2 /mnt/home 4:passez en mode root 5: changez votre mot de passe 6:reboot soit en console soit via MANAGER ovh

Les IP et les noms de domaine Internet est un grand réseau composé de très nombreux ordinateurs. Pour qu'ils puissent communiquer entre eux, ils doivent pouvoir s'identifier. Sans nom, il serait impossible de différencier chacun des ordinateurs ! Pour résoudre ce problème, on a décidé d'attribuer un numéro d'identification unique à chaque ordinateur : c'est l'adresse IP. Adresses IPv4 Les adresses IP, que vous avez très probablement rencontrées, ont la forme suivante : Ce sont des séries de 4 nombres compris entre 0 et 255. Ces adresses IP constituées de 4 nombres sont les plus répandues à l'heure actuelle, on les appelle IPv4. IPv6 La nouvelle forme d'IP, que l'on va rencontrer de plus en plus, a la forme suivante : 1703:01b8:43c4:85a3:0000:0000:a213:bba7 C'est une combinaison de plusieurs nombres hexadécimaux (d'où la présence des lettres a, b, c...), ce qui amène le nombre d'IP possibles à 2^{128}, ce qui représente un très très grand nombre ! ). Bonne question. Mais cette résolution ne fonctionne pas par magie.

WSDL Reading, a Beginner's Guide By: Thomas BayerDate: 08/24/2009 This article explains how to read a WSDL document by analyzing the Web Services description of a public sample Service. During the article a tree diagram is developed from the content of the WSDL document. The tree illustrates the structure of WSDL. The root element of a WSDL document is definitions. Figure 1: Definition and Service To analyse a WSDL document it is recommended to read it from the buttom upwards. Listing 1: Service Element The name of the service is BLZService. Figure 2: Ports of a Service Let's have a look at the first port in listing 2. Listing 2: Port describing a SOAP 1.1 Endpoint It's child element address has a different XML prefix than the other elements. Figure 3: Endpoint Address To move on, we have to look at the binding attribute of the port.The value "tns:BLZServiceSOAP11Binding" points to a binding further up in the document. Figure 4: A Port references a Binding A binding provides details about a specific transport. References

XAMPP: SSL Encrypt the Transmission of Passwords with https This article is part of a series of articles about making XAMPP more secure. See the overview page for all the security measures. If you don’t have encryption enabled on a password protected folder, the password will be sent in cleartext – meaning that it can be seen by anyone using a network sniffer. It is a good idea to encrypt the transmission of these passwords. Create SSL Certificate and Server Private Key In order to enable the encryption of your password, you must create an SSL certificiate (containing your public key) and a server private key. XAMPP provides a batch file for creating a new certificate/key with random encryption keys. Open a command window (Start->Run, type “cmd” and press “OK)cd c:\xampp\apachemakecert You will then see this: Enter in a pass phrase for decrypting your private server key, and press Enter. Verifying - Enter PEM pass phrase: Enter your passphrase a second time and hit Enter. Enter in your 2 letter country code. Importing the certificate into IE 7

Related: