Post4VPS Forum | Free VPS Provider
Apache2 Restart - Printable Version

+- Post4VPS Forum | Free VPS Provider (https://post4vps.com)
+-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion)
+--- Forum: VPS Support (https://post4vps.com/Forum-VPS-Support)
+--- Thread: Apache2 Restart (/Thread-Apache2-Restart)

Pages: 1 2


Apache2 Restart - Rehan - 10-03-2018

Hello Friends, I am having trouble in restarting the apache2.When i use cmd to restart appache2 it shows:

 "Job for apache2.service failed because the control process exited with error code.

See "systemctl  status apache2.service" and "journalctl  -xe" for details."


I searched google and found a command and received output.


[color=red]Codes Removed[/red]


RE: Apache2 Restart - Mashiro - 10-03-2018

These lines are mostly important:
Code:
Oct 03 07:30:31 123.123.123.123 apachectl[8561]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 20 of /etc/apache2/sites-enabled/smf-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory

You may want to edit out your IP from the logs.


Looks like there is either something that is misconfigured or actually pointing to something that is missing.

Unfortunately this is as far as I can help. Not a Apache2 user. Sorry.


RE: Apache2 Restart - youssefbasha - 10-03-2018

Iam using this cmd to restart my Apache, try it
sudo service apache2 restart
If you failed then backup your files and reset your vps


RE: Apache2 Restart - Mashiro - 10-04-2018

@youssefbasha

Without the intent to offend you or irritate you but you're an absolutely horrible system administrator if your solution for every problem is to take a backup and reset the whole server to start from zero.


@Rehan

I've done a little more research as this is the only thing I could do without a server at hand and no real knowledge with Apache and Let's Encrypt. I found some interesting topics that might help you to solve the problem.

First: It looks like you're using Let's Encrypt for your SSL with Apache 2 module. At least this is what your vHost website configuration from the error log hints. And in one of these configurations points to another configuration that points to yet another file. And this exact file is in the Let's Encrypt installation directory but on your system it seems to be missing.

I'm not sure how you installed your Let's Encrypt SSL but I guess the guide you used is absolutely outdated and not working like this example: https://community.letsencrypt.org/t/options-ssl-apache-conf-doesnt-exist/36042/3

So what I would suggest you is to use the official CertBot with its official installation documentation and SSL certificate generation guide for Apache 2:
- Debian 8 + Apache: https://certbot.eff.org/lets-encrypt/debianjessie-apache
- Debian 9 + Apache: https://certbot.eff.org/lets-encrypt/debianstretch-apache
- Ubuntu 16.04 + Apache: https://certbot.eff.org/lets-encrypt/ubuntuxenial-apache
- Ubuntu 18.04 + Apache: https://certbot.eff.org/lets-encrypt/ubuntubionic-apache
- CentOS 6 + Apache: https://certbot.eff.org/lets-encrypt/centos6-apache
- CentOS 7 + Apache: https://certbot.eff.org/lets-encrypt/centosrhel7-apache

Full documentation with more details: https://certbot.eff.org/docs/


RE: Apache2 Restart - Rehan - 10-04-2018

Thank you guys.I forgot that two days ago i removed certbot.I have cleared the configs now and working well.
@Hidden Refuge for the useful links.There was a problem in installing in certbot last time.I hope i will be able to manage this now.
Also i am facing another problem whenever i upload a wordpress theme it shows " the link you followed has expired. ".


RE: Apache2 Restart - humanpuff69 - 10-05-2018

it smell like configuration error . checks for syntax error is most of the time is a typo . i always get this error when i didnt type my config correctly

try checking your config and restart again hopefullt it does work


RE: Apache2 Restart - youssefbasha - 10-05-2018

(10-04-2018, 04:54 AM)Hidden Refuge Wrote: @youssefbasha

Without the intent to offend you or irritate you but you're an absolutely horrible system administrator if your solution for every problem is to take a backup and reset the whole server to start from zero.

Umm, u didn't get my point.. 
By saying if you failed i meant failed after searching at google and etc


RE: Apache2 Restart - Littlemaster - 10-06-2018

@Rehan edit your php.ini file and change
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300


RE: Apache2 Restart - Rehan - 10-06-2018

(10-06-2018, 01:35 AM)Littlemaster Wrote: @Rehan edit your php.ini file and change
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300

Thank you brother for information.Its working fine for me now but you should explain which directory.I searched the file name and found it.
Here is the directory /etc/php/7.1/apache2/php.ini.


RE: Apache2 Restart - Littlemaster - 10-06-2018

php.ini file may be in different directory for different configurations, well, you can search and find the path.