logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Help with Virtual Host
Author
Benedict3578



Joined: 09 Dec 2012
Posts: 3

PostPosted: Sun 09 Dec '12 13:46    Post subject: Help with Virtual Host Reply with quote

Hi,

I have got an Apache server running and I am trying to host about seven domains on it. Currently, I want to only set it up with one but then have the ability to expand. I have tried for about three hours to set up the domain myself, but it does not work. Please could someone tell me what to do, and where I went wrong. Any files and information you might need are below:

Domain: justcode.us
Location of HTML etc. Files: /home/www/justcode.us/htdocs/

File 1: /etc/apache2/sites-available/justcode.us
Code:

<VirtualHost *:80>
   ServerAdmin benedict@justcode.us
   ServerName justcode.us
   ServerAlias www.justcode.us

   DocumentRoot /home/www/justcode.us/htdocs
   <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>


File 2: /etc/apache2/httpd.conf

Admin Note:
httpd conf removed, use paste bin, see forum rules


I have created the symbolic link in /etc/apache2/sites-enabled/justcode.us.

If you need any more information, I can give you access to the server if you can fix it for me.

Please help me, I'm tearing my hair out trying to get this done! Smile
Back to top
maba



Joined: 05 Feb 2012
Posts: 64
Location: Germany, Heilbronn

PostPosted: Fri 14 Dec '12 11:25    Post subject: Reply with quote

Hello,

I can see nothing that would be obviously wrong. From the description it looks like a Debian or Ubuntu setup.

What does the command
Code:

apache2 -S

give as a result? Please be sure to use upper case S.

Maba[/code]
Back to top
Benedict3578



Joined: 09 Dec 2012
Posts: 3

PostPosted: Fri 14 Dec '12 11:32    Post subject: Result of apache2 -S Reply with quote

Here is the result:
Code:
apache2: bad user name ${APACHE_RUN_USER}
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 14 Dec '12 12:11    Post subject: Reply with quote

Search for
User
in your httpd.conf

there change

Code:
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}


to

Code:
User www-data
Group www-data
Back to top
Benedict3578



Joined: 09 Dec 2012
Posts: 3

PostPosted: Fri 14 Dec '12 13:15    Post subject: Reply with quote

James Blond wrote:
Search for
User
in your httpd.conf

there change

Code:
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}


to

Code:
User www-data
Group www-data


I do not have
Code:

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

in my http.conf file. Could you provide me with a example of what it should look like?

Thanks very much for the great support Smile
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 17 Dec '12 16:23    Post subject: Reply with quote

I can see where in your config the user stuff is defined. So you have to search it (shell)
Code:

cd /etc/apache2/
grep -rn "User" *
Back to top


Reply to topic   Topic: Help with Virtual Host View previous topic :: View next topic
Post new topic   Forum Index -> Apache