Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Nov 26, 2008 1:32 am 
Offline
Newbie

Joined: Wed Nov 26, 2008 1:23 am
Posts: 3
Hi everyone,

I am new to the linux distribution so if anyone could kinnda guide me through the process would be great..

Correct me if I am wrong do I need to install apache server on ubuntu server or does ubuntu server comes with apache?

If yes, how can i install apache, php and mysql using putty as my SSH?

Any help would be appreciated

Thanks


Top
   
 Post subject:
PostPosted: Wed Nov 26, 2008 1:33 am 
Offline
Senior Member

Joined: Fri Sep 12, 2008 3:17 am
Posts: 166
Website: http://independentchaos.com
http://www.howtoforge.com/perfect-server-ubuntu-8.10-p3

follow that. skip parts you don't need.


Top
   
 Post subject:
PostPosted: Fri Nov 28, 2008 4:28 am 
Offline
Newbie

Joined: Wed Nov 26, 2008 1:23 am
Posts: 3
Thanks freedom_is_chaos


Top
   
 Post subject: Some easy tutorials!
PostPosted: Tue Dec 02, 2008 8:27 pm 
Offline
Junior Member

Joined: Tue Dec 02, 2008 8:24 pm
Posts: 22
Website: http://www.iheartlinux.com
Location: Pennsylvania
http://www.routermods.com/ubuntu

My site hosted here! and q's don't hesitate to ask!


Top
   
 Post subject:
PostPosted: Sat Dec 06, 2008 11:23 pm 
Offline
Newbie

Joined: Wed Nov 26, 2008 1:23 am
Posts: 3
Thanks routermods.. Great article


Top
   
 Post subject:
PostPosted: Thu Dec 18, 2008 2:42 pm 
Offline
Senior Newbie

Joined: Tue Dec 16, 2008 2:13 pm
Posts: 7
Excellent Article!!!

I followed along, and got no errors, but i cannot load my site. if i ping the server, i get a response, but no site.

my site is silliemunkie.com

thanks,
Jason


Top
   
 Post subject: Your using ubuntu?
PostPosted: Thu Dec 18, 2008 4:14 pm 
Offline
Junior Member

Joined: Tue Dec 02, 2008 8:24 pm
Posts: 22
Website: http://www.iheartlinux.com
Location: Pennsylvania
Are you using ubuntu?
Can your stop then start your apache or do you get errors?

_________________
Image


Top
   
 Post subject:
PostPosted: Thu Dec 18, 2008 5:51 pm 
Offline
Senior Newbie

Joined: Tue Dec 16, 2008 2:13 pm
Posts: 7
I'm using Ubuntu 8.10

I rebuilt the server, and started from the beginning. It seems the problem was I deleted something from the sites-available/default

I followed the rest of the tutorial, and got a site running on silliemunkie.com

I am having trouble creating a second vHost. I went through the tutorial a second time, and created the same directories, and files. when i run a2ensite for the new domain, and then reload, i get a fail error. then my original site won't load. if i run a2dissite for the new domain and reload the original domain loads again.

Is there a configuration that i need to make to allow both vhosts to run?

thank you,
Jason


Top
   
 Post subject: Did you do this?
PostPosted: Thu Dec 18, 2008 7:41 pm 
Offline
Junior Member

Joined: Tue Dec 02, 2008 8:24 pm
Posts: 22
Website: http://www.iheartlinux.com
Location: Pennsylvania
cd /etc/apache2/
...
sudo nano sites-available/default

Delete the ‘NameVirtualHost *’ line and change the next ‘VirtualHost’ line so the file begins like this:

<virtualhost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
</virtualhost>


if so open up you apache error log and post it for me. /etc/apache2/error.log

_________________
Image


Top
   
 Post subject:
PostPosted: Thu Dec 18, 2008 8:37 pm 
Offline
Senior Newbie

Joined: Tue Dec 16, 2008 2:13 pm
Posts: 7
The NameVirtualHost does not appear in the file

here are the entries in the error log
[Thu Dec 18 21:40:12 2008] [notice] Graceful restart requested, doing restart
(2)No such file or directory: apache2: could not open error log file /var/www/v$
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/www/v$
Unable to open logs
[Thu Dec 18 21:40:42 2008] [warn] pid file /var/run/apache2.pid overwritten -- $
[Thu Dec 18 21:40:42 2008] [notice] Apache/2.2.9 (Ubuntu) configured -- resumin$
[Thu Dec 18 21:43:19 2008] [notice] Graceful restart requested, doing restart
[Thu Dec 18 21:43:19 2008] [notice] Apache/2.2.9 (Ubuntu) configured -- resumin$
[Thu Dec 18 21:43:32 2008] [notice] Graceful restart requested, doing restart
(2)No such file or directory: apache2: could not open error log file /var/www/v$
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/www/v$
Unable to open logs
[Thu Dec 18 21:44:34 2008] [warn] pid file /var/run/apache2.pid overwritten -- $
[Thu Dec 18 21:44:34 2008] [notice] Apache/2.2.9 (Ubuntu) configured -- resumin$
[Thu Dec 18 22:05:43 2008] [error] [client 199.217.156.114] File does not exist$
[Thu Dec 18 22:05:46 2008] [error] [client 199.217.156.114] File does not exist$
[Thu Dec 18 22:30:34 2008] [error] [client 221.192.199.36] File does not exist:$



thanks,
Jason


Top
   
 Post subject: LOGS
PostPosted: Fri Dec 19, 2008 9:54 am 
Offline
Junior Member

Joined: Tue Dec 02, 2008 8:24 pm
Posts: 22
Website: http://www.iheartlinux.com
Location: Pennsylvania
there is something wrong with your log folder. Make sure you adjust permissions to let apache write to the folder. and make sure you named correct or set correct path in the site:

Custom Virtual Hosts

We’ve set up the basics and now we’re ready to add our own virtual hosts so we can start to serve our domains.

Let’s go ahead and create the vhost file for domain.com:

nano /etc/apache2/sites-available/domain.com

The contents need to look like this:

# Place any notes or comments you have here
# It will make any customisation easier to understand in the weeks to come

# domain: domain1.com
# public: /var/www/vhosts/domain.com/domain.com/

<virtualhost *:80>

# Admin email, Server Name (domain name) and any aliases
ServerAdmin webmaster@domain.com
ServerName domain.com
ServerAlias www.domain.com


# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /var/www/vhosts/domain.com/htdocs


# Custom log file locations
LogLevel warn
ErrorLog /var/www/vhosts/domain.com/log/error.log
CustomLog /var/www/vhosts/domain.com/log/access.log combined


</virtualhost>

_________________
Image


Top
   
 Post subject:
PostPosted: Fri Dec 19, 2008 12:01 pm 
Offline
Senior Newbie

Joined: Tue Dec 16, 2008 2:13 pm
Posts: 7
i corrected the permissions for the logs. just want to double check my settings.

here is the default from sites-available/default

<VirtualHost *:80>
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

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>

here is the code from sites-available/silliemunkie.com

# Place any notes or comments you have here
# It will make any customisation easier to understand in the weeks to come

# domain: domain1.com
# public: /var/www/vhosts/domain.com/domain.com/

<virtualhost *:80>

# Admin email, Server Name (domain name) and any aliases
ServerAdmin webmaster@silliemunkie.com
ServerName silliemunkie.com
ServerAlias www.silliemunkie.com


# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /var/www/vhosts/silliemunkie.com/htdocs


# Custom log file locations
LogLevel warn
ErrorLog /var/www/vhosts/domain.com/log/error.log
CustomLog /var/www/vhosts/domain.com/log/access.log combined

</virtualhost>


anything look out of order?

thanks,
Jason


Top
   
 Post subject:
PostPosted: Fri Dec 19, 2008 12:52 pm 
Offline
Senior Newbie

Joined: Tue Dec 16, 2008 2:13 pm
Posts: 7
if i leave all of the default settings and files in place, I can view both domains. but if i run a2dissite default, and then a2ensite silliumunkie, and then reload, i can't see either site. if i reverse those changes, the sites are back on-line.

silliemunkie.com
thecatatemysourcecode.com

thanks,
Jason


Top
   
 Post subject:
PostPosted: Fri Dec 19, 2008 2:08 pm 
Offline
Senior Newbie

Joined: Tue Dec 16, 2008 2:13 pm
Posts: 7
Okay, i think i got it fixed. I installed webmin, and created two new virtual hosts using the webmin apache interface. Both sites load now, and display the pages i created. Which means that i missed something when i was creating the vHosts via the command line. Now i need to go through all of the files and figure out what i missed.

thanks for your help,
Jason


Top
   
 Post subject:
PostPosted: Fri Jan 23, 2009 4:56 am 
Offline
Senior Newbie

Joined: Thu Jan 22, 2009 7:20 pm
Posts: 11
Website: http://wpthoughts.com/
Location: Sydney
I found that when I needed two or more VirtualHosts, I needed to add the following to the apache2.conf file:
Code:
NameVirtualHost *:80
<ifmodule mod_ssl.c>
  NameVirtualHost *:443
</ifmodule>


If I didn't add that line, I got the following error when reloading Apache2:

[warn] _default_ VirtualHost overlap on port 80, the first has precedence

Try the above, and see if that works.


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


Who is online

Users browsing this forum: No registered users and 2 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