frijole Posted April 2, 2008 Share Posted April 2, 2008 I have downloaded the 2.2.8 Apache server source, ran ./configure , ran make , and make install to compile and install the software. Now, I am in my /usr/local/apache2/bin directory and in my instructions I am supposed to run apachectl start but when I do my console says this: frijole@theBean:/usr/local/apache2/bin$ apachectl start bash: apachectl: command not found Does anyone know what is going on? Thanks for reading through all of that by the way. Quote Link to comment Share on other sites More sharing options...
trq Posted April 2, 2008 Share Posted April 2, 2008 You will need to be root to run apachectl. Quote Link to comment Share on other sites More sharing options...
frijole Posted April 2, 2008 Author Share Posted April 2, 2008 I have tried with sudo, but still nothing. Here is the terminal data if that helps: frijole@theBean:/usr/local/apache2/bin$ sudo apachectl start sudo: apachectl: command not found frijole@theBean:/usr/local/apache2/bin$ sudo apachectl sudo: apachectl: command not found Quote Link to comment Share on other sites More sharing options...
trq Posted April 2, 2008 Share Posted April 2, 2008 /usr/local/apache2/bin won't be in your path so you will need to execute... ./apachctl start from within /usr/local/apache2/bin Can I ask what distro your using and why you have chosen to install from source? Quote Link to comment Share on other sites More sharing options...
frijole Posted April 2, 2008 Author Share Posted April 2, 2008 I'm using Ubuntu 8.04, I mostly just wanted to do it for the experience. I am setting up Apache, MySQL, and PHP. /usr/local/apache2/bin won't be in my path because of Ubuntu not allowing me to be root? What does the ./ do? I ran ./apachectl and this is what I got: frijole@theBean:/usr/local/apache2/bin$ sudo ./apachectl start [sudo] password for frijole: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName Quote Link to comment Share on other sites More sharing options...
trq Posted April 2, 2008 Share Posted April 2, 2008 /usr/local/apache2/bin won't be in your path because it is an unusual location to store a binary. /usr/local/bin will be in your path, along with the other common locations. Check it out by typing... echo $PATH in your term. The ./ allows you to execute a program in the current directory. thus eliminating the need for it to be in your path. As for your error. You need to set the ServerName directive within your httpd.conf file. Also, make sure your /etc/hosts file is setup correctly. Post it here if your not sure. Quote Link to comment Share on other sites More sharing options...
frijole Posted April 4, 2008 Author Share Posted April 4, 2008 I checked my /etc/host.conf and it is empty except for some comments. What should this file contain? Also, I used the Alias directive to enable me to put my web files in a different directory, like this: # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a <Directory> section to allow access to # the filesystem path. Alias /PHP_Projects /home/frijole/Documents/phpclass But, when I try to access a file in that location from a web browser, it says permission denied. Although when i go to "localhost" it shows a web page that just says "it works" which I think means the Apache server is set up ok? Why would permission be denied? Quote Link to comment Share on other sites More sharing options...
frijole Posted April 4, 2008 Author Share Posted April 4, 2008 when I go to this url: http://localhost/PHP_Projects/ this is in the browser window: Forbidden You don't have permission to access /PHP_Projects/ on this server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.