0

hello everyone gld this community exist !
i'm facing new problem with apache2 on ubuntu i'm using lamp from yesterday and everything works fine knowing that i'm originaly from windows !
so when i type gksu service apache2 start in terminal and then put my password, when i refresh localhost on navigtor my site doesn't load, so i type gksu service apache2 sttusi get this

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Sun 2017-06-11 17:52:48 EEST; 8s ago
  Process: 7418 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

juin 11 17:52:48 christou-development-machine systemd[1]: Starting The Apache HTTP Serv
juin 11 17:52:48 christou-development-machine apachectl[7418]: apache2: Syntax error on
juin 11 17:52:48 christou-development-machine apachectl[7418]: Action 'start' failed.
juin 11 17:52:48 christou-development-machine apachectl[7418]: The Apache error log may
juin 11 17:52:48 christou-development-machine systemd[1]: apache2.service: Control proc
juin 11 17:52:48 christou-development-machine systemd[1]: Failed to start The Apache HT
juin 11 17:52:48 christou-development-machine systemd[1]: apache2.service: Unit entered
juin 11 17:52:48 christou-development-machine systemd[1]: apache2.service: Failed with 

then i try this to find the error journalctl | apache2 i get this

 AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir takes one argument, Common directory for run-time files (shared memory, locks, etc.)
christou@christou-development-machine:~$ gksu service apache2 status
christou@christou-development-machine:~$ journalctl | apache2
[Sun Jun 11 18:07:25.165228 2017] [core:warn] [pid 7665] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir takes one argument, Common directory for run-time files (shared memory, locks, etc.)

so when i open my config my config page in line 80 i really don't what to do with it this wht is in line 80 DefaultRuntimeDir ${APACHE_RUN_DIR}

5
Contributors
12
Replies
50
Views
2 Months
Discussion Span
Last Post by rproffitt
Featured Replies
  • 2
    pty 280   2 Months Ago

    What's `APACHE_RUN_DIR` set to? It will be defined elsewhere in your config Read More

  • 3
    cereal 1,419   2 Months Ago

    `${APACHE_RUN_DIR}` should be defined in `/etc/apache2/envvars`, now I don't have one to verify, but it should be something like: export APACHE_RUN_DIR=/var/run/apache2$SUFFIX Read More

  • 1
    diafol 3,669   2 Months Ago

    Sorry maybe not a fix but xampp for Linux is a handy download and easier than installing separate components manually. Read More

  • @chris. If you want to remove the apache2 directory why didn't you remove it. Your choice of rm or GUI. As to know how to install it, you shared only 1 of the 3 install commands. I see the purge command was shared along with xampp. Read More

2

What's APACHE_RUN_DIR set to? It will be defined elsewhere in your config

3

${APACHE_RUN_DIR} should be defined in /etc/apache2/envvars, now I don't have one to verify, but it should be something like:

export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
0

this is the line 80 of apache2.conf DefaultRuntimeDir ${APACHE_RUN_DIR}this is alla what i found in line 80 what can i do with it.
i checked the envvas too i find in line 20 this export APACHE_RUN_DIR=/var/run/apache2$SUFFIX

1

the link you gave me i have been on before none of that gave answer so i posted here!
conclusion now i want to remove apache2 but to install new hopping that will install without problem but the folder apache2 remain with everything i'm using sudo apt-get remove apache*
is there i way to remove apache2 completly and make my pc forget it for ever ??

0

@chris. I'm not there to dive into your apache but the answer there looked good. That doesn't mean it is the answer to this one.

FIRST, never assume your files are going to survive. Why folk haven't learned this lesson is a mystery. If you have pages or folders you want safe, then copy those to backups.

SECOND. Try the LAMP install steps at http://howtoubuntu.org/how-to-install-lamp-on-ubuntu It's more than the single apt-get you wrote here.

1

Sorry maybe not a fix but xampp for Linux is a handy download and easier than installing separate components manually.

0

is there i way to remove apache2 completly and make my pc forget it for ever ??

Yes, you can run:

sudo dpkg --purge apache2

This however will not remove the default document root (usually /var/www/html/) as the installation writes the welcoming apache frontpage.

0

i know how to install it but how to remove everything of apache2 but using sudo apt-get remove apache* everything remain the same nothing change the apache2 folder is still on my computer do i have to reinstall ubuntu to start everything again !??

0

doing this code journalctl | apache2 in terminal i get this as result

//this is the error message i get 
AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir takes one argument, Common directory for run-time files (shared memory, locks, etc.)

i oppened apache2.conf so in line 80 this is what i found DefaultRuntimeDir ${APACHE_RUN_DIR} i checked also the envarrs file and this is what is in

# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
# temporary state file location. This might be changed to /run in Wheezy+1
export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
1

@chris. If you want to remove the apache2 directory why didn't you remove it. Your choice of rm or GUI.

As to know how to install it, you shared only 1 of the 3 install commands. I see the purge command was shared along with xampp.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.