title: web admin noob - broke local webserver while trying to install jenkins
body: <p>I just broke my local development web server while trying to install jenkins.  Jenkins works.  But other sites that I have built and used to access on my web server do not work.
  I was following this article: <a href="https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu" rel="nofollow">https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu</a></p>
  
  <p>After following the main section to download and install jenkins, i ran the steps in the section "Setting up an Apache Proxy for port 80 -> 8080".
  That's when I managed to break apache. </p>
  
  <p>Here's the history of what I ran: </p>
  
  <pre><code>me@mydevbox:~$ sudo apt-get install jenkins
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages were automatically installed and are no longer required:
    linux-image-4.2.0-34-generic linux-image-extra-4.2.0-34-generic
    python-support
  Use 'apt-get autoremove' to remove them.
  The following extra packages will be installed:
    daemon
  The following NEW packages will be installed:
    daemon jenkins
  0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
  Need to get 64.0 MB of archives.
  After this operation, 65.1 MB of additional disk space will be used.
  Do you want to continue? [Y/n] Y
  Get:1 http://us.archive.ubuntu.com/ubuntu/ wily/universe daemon amd64 0.6.4-1 [98.2 kB]
  Get:2 http://pkg.jenkins-ci.org/debian-stable/ binary/ jenkins 1.651.2 [63.9 MB]
  Fetched 64.0 MB in 6s (9,372 kB/s)                                             
  Selecting previously unselected package daemon.
  (Reading database ... 433471 files and directories currently installed.)
  Preparing to unpack .../daemon_0.6.4-1_amd64.deb ...
  Unpacking daemon (0.6.4-1) ...
  Selecting previously unselected package jenkins.
  Preparing to unpack .../jenkins_1.651.2_all.deb ...
  Unpacking jenkins (1.651.2) ...
  Processing triggers for man-db (2.7.4-1) ...
  Processing triggers for systemd (225-1ubuntu9) ...
  Processing triggers for ureadahead (0.100.0-19) ...
  Setting up daemon (0.6.4-1) ...
  Setting up jenkins (1.651.2) ...
  initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
  [ ok ] Starting jenkins (via systemctl): jenkins.service.
  ln: failed to create symbolic link ‘/run/openrc/started/jenkins’: No such file or directory
  Processing triggers for systemd (225-1ubuntu9) ...
  Processing triggers for ureadahead (0.100.0-19) ...
  
  me@mydevbox:~$ sudo /etc/init.d/jenkins start
  [ ok ] Starting jenkins (via systemctl): jenkins.service.
  me@mydevbox:~$ sudo vim /etc/default/jenkins 
  me@mydevbox:~$ /etc/init.d/jenkins restart
  [ ok ] Restarting jenkins (via systemctl): jenkins.service.
  me@mydevbox:~$ 
  </code></pre>
  
  <p>This is what I've specified for the HTTP port in the jenkins config file:</p>
  
  <pre><code># port for HTTP connector (default 8080; disable with -1)
  HTTP_PORT=8080
  </code></pre>
  
  <p>After that, I ran this:  </p>
  
  <pre><code>me@mydevbox:~$ sudo a2enmod proxy
  Enabling module proxy.
  To activate the new configuration, you need to run:
    service apache2 restart
  me@mydevbox:~$ sudo a2enmod proxy_http
  Considering dependency proxy for proxy_http:
  Module proxy already enabled
  Enabling module proxy_http.
  To activate the new configuration, you need to run:
    service apache2 restart
  me@mydevbox:~$ service apache2 restart
  me@mydevbox:~$ sudo a2dissite default
  ERROR: Site default does not exist!
  me@mydevbox:~$ sudo a2dissite 000-default
  Site 000-default disabled.
  To activate the new configuration, you need to run:
    service apache2 reload
   me@mydevbox:~$ service apache2 reload
  </code></pre>
  
  <p>And then I created a jenkins.conf file in /etc/apache2/sites-available/
  That file looks like this: </p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin webmaster@localhost
      ServerName ci.company.com
      ServerAlias ci
      ProxyRequests Off
      &lt;Proxy *&gt;
          Order deny,allow
          Allow from all
      &lt;/Proxy&gt;
      ProxyPreserveHost on
      ProxyPass / http://localhost:8080/ nocanon
      AllowEncodedSlashes NoDecode
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>At this point, when I try to run: </p>
  
  <pre><code>http://localhost:8080/
  </code></pre>
  
  <p>That launches jenkins.</p>
  
  <p>But I no longer can run my other sites which i launched like this: </p>
  
  <pre><code>localhost/mytestapp
  </code></pre>
  
  <p>The error I get is:</p>
  
  <blockquote>
    <p>HTTP ERROR 404</p>
    
    <p>Problem accessing /mytestapp/. Reason:</p>
  
  <pre><code>Not Found
  </code></pre>
  </blockquote>
  
  <p>Prior to attempting Jenkins install, I just installed apache2 and left all defaults.  I would just create folders under /var/www/html and they would "just magically" appear in my browser. </p>
  
  <p>Sorry for the trouble.  But any help would be appreciated. </p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>I think my problem is related to this: </p>
  
  <pre><code> me@mydevbox:~$ sudo a2dissite 000-default
   Site 000-default disabled.
  </code></pre>
  
  <p>I never noticed that in the output before.  When I checked that file, it looks like that was the original conf I had. </p>
  
  <p>Here's what I have in the sites-available folder: </p>
  
  <pre><code>me@mydev:/etc/apache2/sites-available$ ls -lah
  total 24K
  drwxr-xr-x 2 root root 4.0K May 30 11:06 .
  drwxr-xr-x 8 root root 4.0K Apr 19 15:18 ..
  -rw-r--r-- 1 root root 1.5K Apr 19 15:30 000-default.conf
  -rw-r--r-- 1 root root 6.3K Jan  7  2014 default-ssl.conf
  -rw-r--r-- 1 root root  282 May 30 11:06 jenkins.conf
  me@mydev:/etc/apache2/sites-available$ 
  </code></pre>
  
  <p>So I guess I need a way to re-enable 000-default.conf and just add an entry for jenkins to use port 8080 or something like that. 
  Googling for examples but in the mean time, if you have any suggestions, I'd appreciate them. </p>
  
  <p>Thanks. </p>