8 Replies - 1504 Views - Last Post: 17 January 2019 - 12:24 PM

#1 Logomachist   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 82
  • Joined: 10-March 08

[Apache config file(s)] It works? Not for me. :-(

Posted 04 October 2014 - 02:47 PM

I'm sure this is a noob question but could someone look at my /ect/apache2/sites-enabled config file and tell me why I get the default "It works!" instead of the files linked to in sites-enabled? I'm running Kubuntu.
Is This A Good Question/Topic? 0
  • +

Replies To: [Apache config file(s)] It works? Not for me. :-(

#2 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2869
  • View blog
  • Posts: 11,234
  • Joined: 03-December 12

Re: [Apache config file(s)] It works? Not for me. :-(

Posted 04 October 2014 - 06:12 PM

Generally speaking your virtual files would be in etc/httpd/conf/httpd.conf

Not sure if you have this configuration, but I would check there for where it is pointing.
Was This Post Helpful? 0
  • +
  • -

#3 Logomachist   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 82
  • Joined: 10-March 08

Re: [Apache config file(s)] It works? Not for me. :-(

Posted 04 October 2014 - 09:09 PM

I don't have an /etc/httpd/ directory. However I do have a /usr/local/apache2/conf directory that contains a httpd.conf file.

But the most up-to-date documentation I can find says that on Debian systems /etc/apache2/apache2.conf is the main configuration file (that's where I've done my customizations), and/usr/local/apache2/conf/httpd.conf is obselete, so I've mostly ignored it. There's also a /etc/apache2/httpd.conf which is completely blank.

There has to be something here I'm missing. It's like my .../sites-enabled/ directory is being completely ignored.

This post has been edited by Logomachist: 04 October 2014 - 09:34 PM

Was This Post Helpful? 0
  • +
  • -

#4 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2869
  • View blog
  • Posts: 11,234
  • Joined: 03-December 12

Re: [Apache config file(s)] It works? Not for me. :-(

Posted 05 October 2014 - 05:52 AM

I haven't used Debian, I have used Ubuntu server and my primary is centOS. In the docs you linked to, the files you should be modifying are located here: /etc/apache2/sites-available/default or perhaps I miss read it. Then you need to restart the server.
Was This Post Helpful? 0
  • +
  • -

#5 Logomachist   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 82
  • Joined: 10-March 08

Re: [Apache config file(s)] It works? Not for me. :-(

Posted 05 October 2014 - 01:32 PM

That's what I've been doing but for some unknown reason it doesn't work.
Was This Post Helpful? 0
  • +
  • -

#6 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2869
  • View blog
  • Posts: 11,234
  • Joined: 03-December 12

Re: [Apache config file(s)] It works? Not for me. :-(

Posted 06 October 2014 - 12:07 PM

Check: /etc/httpd/conf. The main issue with several different distros is, the file structure can be completely different from one to the next.
Was This Post Helpful? 0
  • +
  • -

#7 Logomachist   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 82
  • Joined: 10-March 08

Re: [Apache config file(s)] It works? Not for me. :-(

Posted 06 October 2014 - 10:09 PM

Ok I finally figured out my problem- /usr/local/apache2/conf/httpd.conf needed to have "Include /etc/apache2/sites-enabled/" added to it. Apparently this (/usr/local/apache2/conf/httpd.conf) is the main configuration file for the version of httpd I'm running, and it seems /etc/apache2/apache2.conf, which was supposed to be the main config file, doesn't do anything important at all (I renamed it to httpd.conf.old and httpd's operation has been unaffected).

My problem now is CGI isn't working- I've followed this Apache tutorial, adding ScriptAlias to declare my scripting directory, adding Options +ExecCGI (in addition to making sure the filesystem permissions are set to executable) to make the scripts executable by Apache, and added AddHandler to let the web server know which file extensions are executable scripts. But when I navigate to the file in a browser the contents of the script, not the output, appears (i.e. the browser tries to download the file).

*sigh*

Here's my httpd.conf.

And my additions spun off into a separate file and linked to the above by an Include.
Was This Post Helpful? 0
  • +
  • -

#8 Logomachist   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 82
  • Joined: 10-March 08

Re: [Apache config file(s)] It works? Not for me. :-(

Posted 07 October 2014 - 08:39 PM

Update: I have a new lead- apparently CGI is disabled by default in the latest version of Apache. I'm going to try recompiling with the options specified at the above link and see if that fixes things.
Was This Post Helpful? 0
  • +
  • -

#9 macnux   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-January 19

Re: [Apache config file(s)] It works? Not for me. :-(

Posted 17 January 2019 - 12:24 PM

I would like to add this informative article about Apache server which describes configuration and troubleshooting.
The best part is the process ownership which is a bit tricky.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1