Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jul 08, 2010 12:31 am 
Offline
Junior Member

Joined: Tue Apr 06, 2010 8:08 pm
Posts: 22
Location: U.S.
POSTSCRIPT: Stoopid me. It's the * that gets replaced in <VirtualHost *> and NameVirtualHost * gets deleted -- right? gawd. how embarrassing
------

Setting up LAMP on Ubuntu 8. Hit a little speed bump. Need to know where to put IP in the sites available default file. Maybe I am just tired/brain getting mushy. THANKS for any help!!

Here's where I am in Linode instructions

---------
INSTRUCTIONS: File excerpt: /etc/apache2/ports.conf. NameVirtualHost 12.34.56.78:80. Be sure to replace "12.34.56.78" with your Linode's public IP address.

WHAT I DID: Used remote file edit in FileZilla/ added entry at end of file.

QUESTION: Assume that's correct? Or does it get placed elsewhere in file?
----------

2.

INSTRUCTIONS: Now, modify the default site's virtual hosting in the same file so that the <VirtualHost > entry reads: File excerpt: /etc/apache2/sites-available/default

<VirtualHost 12.34.56.78:80>

If there is a <NameVirtualHost> entry in the default site's configuration file, remove it.

WHAT I DID: I'm stuck. I don't understand "modify <snip> in the same file." In the same file? ports.conf???

I figured it was just a grammatical mispeak, so I went to /sites-available/default and opened in my text editor.

But where in that file so I add: <VirtualHost --IP > ???

Here's what the file looks like. I don't see any hash marks indicating something to fill in and no clue where to insert the entry.

Code:
NameVirtualHost *
<VirtualHost *>
   ServerAdmin webmaster@localhost
   
   DocumentRoot /var/www/
   <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 /var/log/apache2/error.log

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

   CustomLog /var/log/apache2/access.log combined
   ServerSignature On

    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>


Top
   
PostPosted: Thu Jul 08, 2010 2:19 pm 
Offline
Junior Member
User avatar

Joined: Thu Apr 29, 2010 3:32 pm
Posts: 44
Website: http://devjonfos.net
Location: Oregon
nw-woman wrote:
POSTSCRIPT: Stoopid me. It's the * that gets replaced in <VirtualHost *> and NameVirtualHost * gets deleted -- right? gawd. how embarrassing
------
...

Yes, that's right. Specific addresses in both places is better than a global asterisk.

Also, I use address:80 and address:443 since I have SSL running on my websites.

So on Ubuntu 10.04 edit /etc/apache2/ports.conf and add a
Code:
NameVirtualHost xxx.xxx.xxx.xxx:80


and edit /etc/apache2/sites-available/your-domain.com
Code:
<VirtualHost xxx.xxx.xxx.xxx:80>
     ServerAdmin webmaster@your-domain.com
     ServerName your-domain.com
     ServerAlias www.your-domain.com
     DocumentRoot /srv/www/your-domain.com/httpdocs/
     ErrorLog /srv/www/your-domain.com/logs/error.log
     CustomLog /srv/www/your-domain.com/logs/access.log combined
</VirtualHost>


And duplicate those entries for port 443 with the extra bit added to the VirtualHost:
Code:
     SSLEngine On
     SSLCertificateFile /etc/apache2/ssl/apache.pem
     SSLCertificateKeyFile /etc/apache2/ssl/apache.key


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group