[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Where am I going to put these codes in Apache/2.2.9 (Debian)

Posted on 2009-05-20
3
Medium Priority
?
280 Views
Last Modified: 2013-12-06
Need urgent help as I'm still at work and it's already 9:00pm.
we transfer our site to a new webserver with the new debian apache2 package.
now, with the debian apache2 package, everything is modularized and took me time to know where to set the virtualhosts. now with the htaccess or security settings as posted below.

thanks
#MYWEBSITE1
<Directory "/var/www/mywebsite1">
AllowOverride All
Options +FollowSymLinks Indexes
Order deny,allow
</Directory>
 
#MYWEBSITE2
<Directory "/var/www/mywebsite2">
AllowOverride All
Options +FollowSymLinks Indexes
Order deny,allow
</Directory>

Open in new window

0
Comment
Question by:Raleigh Guevarra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 8

Accepted Solution

by:
yfastud earned 2000 total points
ID: 24431593
you should put them in httpd-vhosts.conf if already enable this file in main config file httpd.conf as below; also make sure to create folder logs in each appropriate folder to make it work

NameVirtualHost *:80
 
#MYWEBSITE1
<VirtualHost *:80>
ServerName www.mywebsite1.com
ServerAlias mywebsite1.com mywebsite1
DocumentRoot /var/www/mywebsite1
ErrorLog /var/www/mywebsite1/logs/error.log
CustomLog /var/www/mywebsite1/logs/access.log common
<Directory "/var/www/mywebsite1">
AllowOverride All
Options +FollowSymLinks Indexes
Order deny,allow
</Directory>
</VirtualHost>
 
#MYWEBSITE2
<VirtualHost *:80>
ServerName www.mywebsite2.com
ServerAlias mywebsite2.com mywebsite2
DocumentRoot /var/www/mywebsite2
ErrorLog /var/www/mywebsite2/logs/error.log
CustomLog /var/www/mywebsite2/logs/access.log common
<Directory "/var/www/mywebsite2">
AllowOverride All
Options +FollowSymLinks Indexes
Order deny,allow
</Directory>
</VirtualHost>

Open in new window

0
 
LVL 8

Assisted Solution

by:yfastud
yfastud earned 2000 total points
ID: 24431786
btw, I've copied and pasted, and after posted, I've recognized you had little mistake in your script which should includes some permission after "Order deny,allow"; for example

Order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx

Open in new window

0
 
LVL 8

Assisted Solution

by:yfastud
yfastud earned 2000 total points
ID: 24431982
btw, httpd.conf file should be in apache2 dir and httpd-vhosts.conf file should be in apache2/extra dir
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question