Find the answer to your Linux question:
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 27 of 27
I don't actually know of a gui for configuring Apache. It is set up using text files. These files are found under the directory /etc/apache2 The files of interest are ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #21
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,482

    I don't actually know of a gui for configuring Apache. It is set up using text files.
    These files are found under the directory /etc/apache2

    The files of interest are

    /etc/apache2/apache2.conf
    /ect/apache2/sites-available/default

    To configure a site on your server, you don't need to mess with the first file, but it
    is worth having a look through as it holds all the apache configuration.

    To view the apache configuration.

    Log on as the user you set up

    Type sudo bash and press enter. This will ask for your password and start a root terminal.
    Type cd /etc/apache2 and press enter. This will move you to the directory.
    Type less apache2.conf and press enter. This will allow you to page through the file.

    The more interesting and indeed relevant part of this is how to set up a site. This is where
    the other file, or rather a copy of the second file comes in to play. Now this is how I set
    up my development server so real admins may have differing opinions on how to do this.

    In my home directory I create a directory for my new site and the directory structure for
    the files and then I configure a new site in apache to point to it. In this article I will
    set up a site called test-site. When we are done we will be able to point a browser at
    http://test-site and get our site displayed.

    I won't be talking about DNS, I will be using the hosts file instead.

    We will also set up a static IP Address

    To set up a static IP Address, you simply edit one file and then run a command!

    Type nano /etc/network/interfaces and press enter
    Edit the file so that it looks like this
    Code:
    auto lo
    iface lo inet loopback
    
    iface eth0 inet static
    address 192.168.0.25
    netmask 255.255.255.0
    gateway 192.168.0.1
    
    auto eth0
    Type /etc/init.d/networking restart and press enter to restart your network.

    To do this.

    Log in as the user you set up

    In your home directory create the directory structure.
    test-site
    cgi-bin
    includes
    logs
    lib
    public-html

    You can do this using the cd and mkdir commands.

    Type sudo bash and press enter. This will ask for your password and start a root terminal.
    Type cd /etc/apache2/sites-available and press enter. This will move you to the directory.
    Type cp default test-site and press enter. This will copy the default file to a new test-site file.
    Type nano test-site and press enter.

    Edit the test-site file so that it looks like this
    Code:
    NameVirtualHost test-site 
    <VirtualHost test-site>
    	ServerAdmin webmaster@localhost
    	
    	DocumentRoot /home/YOURNAME/test-site/public-html/
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride All
    	</Directory>
    	<Directory /home/YOURNAME/test-site/public-html/>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride All
    		Order allow,deny
    		allow from all
    	</Directory>
    
    	ScriptAlias /cgi-bin/ home/YOURNAME/test-site/cgi-bin/
    	<Directory "home/YOURNAME/test-site/cgi-bin">
    		AllowOverride None
    		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    		Order allow,deny
    		Allow from all
    	</Directory>
    
    	ErrorLog /home/YOURNAME/test-site/logs/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog /home/YOURNAME/test-site/logs/access.log combined
    	ServerSignature On
    
    </VirtualHost>
    Type a2ensite test-site and press enter. This enables the site in apache by creating a link in the
    sites-enabled directory.

    Type nano /etc/hosts and press enter. We are going to make sure that your server knows that it serves test-site.
    Add a new line to the hosts file like this
    Code:
    192.168.0.25 rmi-cms
    Type /etc/init.d/apache2 restart and press enter. This restarts apache and if all has gone well, it should be
    serving up your new site.

    To access this site go to a computer on the same network and edit its hosts file like you did on the server and
    browse to http://test-site.

    This is just a quick overview and I suggest you read up on server configuration.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  2. #22
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    Quote Originally Posted by elija View Post
    I don't actually know of a gui for configuring Apache.
    webmin is a good idea. Its usually one of the first things I installed when I don't install a desktop environment. its good for the whole system though, not just apache.

  3. #23
    Just Joined!
    Join Date
    May 2008
    Posts
    9
    Quote Originally Posted by elija View Post
    I don't actually know of a gui for configuring Apache. It is set up using text files.
    These files are found under the directory /etc/apache2

    The files of interest are

    /etc/apache2/apache2.conf
    /ect/apache2/sites-available/default

    To configure a site on your server, you don't need to mess with the first file, but it
    is worth having a look through as it holds all the apache configuration.

    To view the apache configuration.

    Log on as the user you set up

    Type sudo bash and press enter. This will ask for your password and start a root terminal.
    Type cd /etc/apache2 and press enter. This will move you to the directory.
    Type less apache2.conf and press enter. This will allow you to page through the file.

    The more interesting and indeed relevant part of this is how to set up a site. This is where
    the other file, or rather a copy of the second file comes in to play. Now this is how I set
    up my development server so real admins may have differing opinions on how to do this.

    In my home directory I create a directory for my new site and the directory structure for
    the files and then I configure a new site in apache to point to it. In this article I will
    set up a site called test-site. When we are done we will be able to point a browser at
    http://test-site and get our site displayed.

    I won't be talking about DNS, I will be using the hosts file instead.

    We will also set up a static IP Address

    To set up a static IP Address, you simply edit one file and then run a command!

    Type nano /etc/network/interfaces and press enter
    Edit the file so that it looks like this
    Code:
    auto lo
    iface lo inet loopback
    
    iface eth0 inet static
    address 192.168.0.25
    netmask 255.255.255.0
    gateway 192.168.0.1
    
    auto eth0
    Type /etc/init.d/networking restart and press enter to restart your network.

    To do this.

    Log in as the user you set up

    In your home directory create the directory structure.
    test-site
    cgi-bin
    includes
    logs
    lib
    public-html

    You can do this using the cd and mkdir commands.

    Type sudo bash and press enter. This will ask for your password and start a root terminal.
    Type cd /etc/apache2/sites-available and press enter. This will move you to the directory.
    Type cp default test-site and press enter. This will copy the default file to a new test-site file.
    Type nano test-site and press enter.

    Edit the test-site file so that it looks like this
    Code:
    NameVirtualHost test-site 
    <VirtualHost test-site>
    	ServerAdmin webmaster@localhost
    	
    	DocumentRoot /home/YOURNAME/test-site/public-html/
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride All
    	</Directory>
    	<Directory /home/YOURNAME/test-site/public-html/>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride All
    		Order allow,deny
    		allow from all
    	</Directory>
    
    	ScriptAlias /cgi-bin/ home/YOURNAME/test-site/cgi-bin/
    	<Directory "home/YOURNAME/test-site/cgi-bin">
    		AllowOverride None
    		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    		Order allow,deny
    		Allow from all
    	</Directory>
    
    	ErrorLog /home/YOURNAME/test-site/logs/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog /home/YOURNAME/test-site/logs/access.log combined
    	ServerSignature On
    
    </VirtualHost>
    Type a2ensite test-site and press enter. This enables the site in apache by creating a link in the
    sites-enabled directory.

    Type nano /etc/hosts and press enter. We are going to make sure that your server knows that it serves test-site.
    Add a new line to the hosts file like this
    Code:
    192.168.0.25 rmi-cms
    Type /etc/init.d/apache2 restart and press enter. This restarts apache and if all has gone well, it should be
    serving up your new site.

    To access this site go to a computer on the same network and edit its hosts file like you did on the server and
    browse to http://test-site.

    This is just a quick overview and I suggest you read up on server configuration.
    Woooooa..

    Just read all that and I'm confused more than I was before..

    Is there any easier way to do it or is this the easiest way? Like I said we have NO idea what we are doing, at all.

  4. #24
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,482
    Apparently there is webmin - but I don't know what it is like
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  5. #25
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    Quote Originally Posted by elija View Post
    Apparently there is webmin - but I don't know what it is like
    webmin is helpful but its not "click here to magically get apache setup"

    you would still need to know what things mean and what you are doing.
    to the original poster, it might be useful to learn how to use nano or vi from the command line. and then move on to configuring apache. google is your friend.

    (and I only speak for me)although we are all very helpful in this forum, you still need to do some leg work on your hand. we don't usually hand you the answer you want on a silver platter. Its also helpful to know how to use a command shell anyway because yeah, you can get apache up, but what do you do when it breaks

  6. #26
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,482
    Quote Originally Posted by jledhead View Post
    you still need to do some leg work on your hand
    This bit sounds painful but overall I agree with you
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  7. #27
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    Quote Originally Posted by elija View Post
    This bit sounds painful but overall I agree with you


    actually that does sound painful

    hand = own
    :drown:

Page 3 of 3 FirstFirst 1 2 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •