Ubuntu Server - Apache2 Virtual Hosts in Intranet
Marios Zindilis
marios at zindilis.com
Wed Jul 27 16:33:21 UTC 2011
@Alexius Dionysius Diakogiannis
Εννοούσα σε κάθε υπολογιστή πελάτη στο δίκτυο να οριστεί η γραμμή στο
hosts. Δεν ήταν ξεκάθαρο από την απάντησή μου όμως. Για μικρό αριθμό
συστημάτων είναι μια επίπονη αλλά βολική λύση.
On 07/26/2011 07:23 PM, Panagiotis Theodoropoulos wrote:
> Ευχαριστώ για τις απαντήσεις.
> Η λύση που έδωσα ήταν να δηλώσω τα Virtual hosts στο file hosts του
> client, γιατί σε κάθε περίπτωση ήταν για τεστ και δεν έχω την δυνατότητα
> τοπικού DNS, καθόσον όλα γίνονται κάτω από εταιρικό δίκτυο.
>
> Χαιρετισμούς
>
> 2011/7/26 Alexius Dionysius Diakogiannis
> <alexius.dionysius at diakogiannis.com
> <mailto:alexius.dionysius at diakogiannis.com>>
>
>
>
> Sent From iPhone
> Και οι υπόλοιποι υπολογιστές στο δίκτυο αν τον καλεί με hostname που
> θα ξέρουν ποιος είναι;
>
> Think Before You Print This Email
>
> 26 Ιουλ 2011, 17:46, ο/η Marios Zindilis <marios at zindilis.com
> <mailto:marios at zindilis.com>> έγραψε:
>
> > Στο /etc/hosts θα προσθέσεις κάτι σαν:
> >
> > 10.11.21.198 mydomain.local myseconddomain.local myvirtualhost.house
> >
> > Δηλαδή την IP και μετά μια λίστα με τα ονόματα τομέα που θα
> εξυπηρετεί ο συγκεκριμένος εξυπηρετητής.
> >
> > On 07/26/2011 04:45 PM, Panagiotis Theodoropoulos wrote:
> >> *Οχι*.
> >> Στο intranet χρειάζεται οι ρυθμίσεις και στο host του κάθε
> client που θα
> >> βλέπει τα Virual Hosts?
> >> host file = /etc/hosts ?
> >> Στα Windows?
> >>
> >> 2011/7/26 Alexius Dionysius
> Diakogiannis<alexius.dionysius at diakogiannis.com
> <mailto:alexius.dionysius at diakogiannis.com>
> >>>
> >>
> >>>
> >>> Στο pc που πας να τα δεις Έχεις κάνει αντίστοιχες ρυθμίσεις στο
> host file?
> >>>
> >>> Sent From iPhone
> >>>
> >>> Alexius Dionysius Diakogiannis
> >>>
> >>>
> >>> Think Before You Print This Email
> >>>
> >>> 26 Ιουλ 2011, 15:51, ο/η Panagiotis
> Theodoropoulos<tpanagiotis at gmail.com <mailto:tpanagiotis at gmail.com>>
> >>> έγραψε:
> >>>
> >>>> Σε Ubuntu Server που τρέχει σε Intranet δίκτυο και έχει την
> static ip
> >>>> 10.11.21.198 θέλω στον Apache2 να δημιουργήσω Virual Hosts.
> >>>> Διάβασα πάρα πολλά σχετικά με το θέμα και το πρόβλημά μου
> είναι ότι ενώ
> >>> τα
> >>>> δημιουργώ σύμφωνα με τις οδηγίες και τα βλέπω (browser) από
> τον ίδιο τον
> >>>> server δεν μπορώ να τα δώ από κανένα client του δικτύου.
> >>>> Μήπως δεν υπάρχει αυτή η δυνατότητα?
> >>>> Χρειάζεται να κάνω κάποιες επιπλέον ρυθμίσεις?
> >>>>
> >>>> ----- Οι βασικές ρυθμίσεις που έκανα----
> >>>>
> >>>>
> >>>> 1. *cd /etc/apache2/sites-available*
> >>>> 2. *sudo vim
> **myvirtualhost.local<http://yourdomain.com/>**.conf*
> >>> and
> >>>> enter VirtualHost directive.
> >>>> <VirtualHost *:80>
> >>>> ServerName myvirtualhost.local<http://yourdomain.com/>
> >>>> DocumentRoot /var/www/myvirtualhost
> >>>> </VirtualHost>
> >>>> Save& exit.
> >>>> 3. *sudo vim /etc/hosts* and add new domain so it looks like
> this:
> >>>> 4. *127.0.0.1 localhost
> >>>> 10.11.21.198 myvirtualhost.local<http://yourdomain.com/>*
> >>>>
> >>>> Save& exit.
> >>>> 5. Enable your new virtualhost:
> >>>> *sudo a2ensite myvirtualhost.local<http://yourdomain.com/>.conf*
> >>>> 6. Reload the Apache configuration:
> >>>> sudo /etc/init.d/apache2 reload
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Παναγιώτης Θεοδωρόπουλος
> >>>> Panagiotis Theodoropoulos
> >>>> <tpanagiotis at gmail.com <mailto:tpanagiotis at gmail.com>>
> >>>> -------------- next part --------------
> >>>> An HTML attachment was scrubbed...
> >>>> URL:<
> >>>
> https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20110726/4b6698a0/attachment.html
> >>>>
> >>>> --
> >>>> Ubuntu-gr mailing list
> >>>> Ubuntu-gr at lists.ubuntu.com <mailto:Ubuntu-gr at lists.ubuntu.com>
> >>>>
> >>>> If you do not want to receive any more messages from the ubuntu-gr
> >>> mailing list, please follow this link and choose unsubscribe:
> >>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
> >>>
> >>
> >>
> >>
> >
> >
> > --
> > Ubuntu-gr mailing list
> > Ubuntu-gr at lists.ubuntu.com <mailto:Ubuntu-gr at lists.ubuntu.com>
> >
> > If you do not want to receive any more messages from the
> ubuntu-gr mailing list, please follow this link and choose unsubscribe:
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
>
> --
> Ubuntu-gr mailing list
> Ubuntu-gr at lists.ubuntu.com <mailto:Ubuntu-gr at lists.ubuntu.com>
>
> If you do not want to receive any more messages from the ubuntu-gr
> mailing list, please follow this link and choose unsubscribe:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
>
>
>
>
> --
> Παναγιώτης Θεοδωρόπουλος
> Panagiotis Theodoropoulos
> <tpanagiotis at gmail.com <mailto:tpanagiotis at gmail.com>>
More information about the Ubuntu-gr
mailing list