انجمنهای فارسی اوبونتو
کمک و پشتیبانی => نرمافزارهای اینترنتی => نویسنده: mamadism در 07 فروردین 1401، 11:11 بظ
-
سلام
وقتی دستور اپاچی رو چه با سودو چه بی سودو میزنم اینو میاره
sudo apache2
[Sun Mar 27 22:59:30.262972 2022] [core:warn] [pid 122810] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
با systemctl هم وضعیتشو چک کردم این اومد
× apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-03-27 23:07:43 +0430; 21s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 123537 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 37ms
مارس 27 23:07:43 mamadistan apachectl[123540]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1>
مارس 27 23:07:43 mamadistan apachectl[123540]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
مارس 27 23:07:43 mamadistan apachectl[123540]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
مارس 27 23:07:43 mamadistan apachectl[123540]: no listening sockets available, shutting down
مارس 27 23:07:43 mamadistan apachectl[123540]: AH00015: Unable to open logs
مارس 27 23:07:43 mamadistan apachectl[123537]: Action 'start' failed.
مارس 27 23:07:43 mamadistan apachectl[123537]: The Apache error log may have more information.
مارس 27 23:07:43 mamadistan systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
مارس 27 23:07:43 mamadistan systemd[1]: apache2.service: Failed with result 'exit-code'.
مارس 27 23:07:43 mamadistan systemd[1]: Failed to start The Apache HTTP Server.
~
مشکلش چیه ؟ با سودو و بی سودو هم امتحان کردم
-
با من چیکار داری هی سودو سودو ! 🤣
ولی چرا گذاشتی توی نقل قول بجای تگ کد !؟
-
خودتون آپاچی رو تنظیم کردید؟ به نظر میاد پیکربندی اون درست نیست.
خروجی این دستور رو قرار بدید.
head -n 80 /etc/apache2/apache2.conf| tail -n 1
-
خب آپاچی خدمته، نباید دست اجراش کنی.
-
با من چیکار داری هی سودو سودو ! 🤣
ولی چرا گذاشتی توی نقل قول بجای تگ کد !؟
🤣 ، حواسم نبود
خودتون آپاچی رو تنظیم کردید؟ به نظر میاد پیکربندی اون درست نیست.
خروجی این دستور رو قرار بدید.
head -n 80 /etc/apache2/apache2.conf| tail -n 1
نه من تنظیمش نکردم
نتیجه دستور:
DefaultRuntimeDir ${APACHE_RUN_DIR}
خب آپاچی خدمته، نباید دست اجراش کنی.
چطور باید اجراش کنم ؟ من تاحالا با اینجوذر نرمافزارا کار نکردم
-
خود سامانهٔ init اجراش میکنه.
این رو بزن:
$ sudo systemctl status apache2.service
-
خود سامانهٔ init اجراش میکنه.
این رو بزن:
$ sudo systemctl status apache2.service
بالاتر هم زدم
ولی مجدد زدم و خروجیش اینه:
$ sudo systemctl status apache2.service
× apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-03-28 11:21:59 +0430; 2h 51min ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1337 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 68ms
مارس 28 11:22:01 mamadistan apachectl[1378]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1>
مارس 28 11:22:01 mamadistan apachectl[1378]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
مارس 28 11:22:01 mamadistan apachectl[1378]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
مارس 28 11:22:01 mamadistan apachectl[1378]: no listening sockets available, shutting down
مارس 28 11:22:01 mamadistan apachectl[1378]: AH00015: Unable to open logs
مارس 28 11:22:01 mamadistan apachectl[1337]: Action 'start' failed.
مارس 28 11:22:01 mamadistan apachectl[1337]: The Apache error log may have more information.
مارس 28 11:21:59 mamadistan systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
مارس 28 11:21:59 mamadistan systemd[1]: apache2.service: Failed with result 'exit-code'.
مارس 28 11:21:59 mamadistan systemd[1]: Failed to start The Apache HTTP Server.
-
این داره میگه یه چیز دیگه روی درگاه ۸۰د در حال اجراست. ببین چیه و خاموشش کن.
-
این داره میگه یه چیز دیگه روی درگاه ۸۰د در حال اجراست. ببین چیه و خاموشش کن.
با نت استیت زدم این دوتا بودن ، چطور بفهمم چیه ؟
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN root 28282 -
tcp6 0 0 [::]:http [::]:* LISTEN root 28283 -
-
خروجی این چیه؟
$ sudo lsof -i :80
-
خروجی این چیه؟
$ sudo lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 1504 root 6u IPv4 28282 0t0 TCP *:http (LISTEN)
nginx 1504 root 7u IPv6 28283 0t0 TCP *:http (LISTEN)
nginx 1505 www-data 6u IPv4 28282 0t0 TCP *:http (LISTEN)
nginx 1505 www-data 7u IPv6 28283 0t0 TCP *:http (LISTEN)
nginx 1506 www-data 6u IPv4 28282 0t0 TCP *:http (LISTEN)
nginx 1506 www-data 7u IPv6 28283 0t0 TCP *:http (LISTEN)
nginx 1507 www-data 6u IPv4 28282 0t0 TCP *:http (LISTEN)
nginx 1507 www-data 7u IPv6 28283 0t0 TCP *:http (LISTEN)
nginx 1508 www-data 6u IPv4 28282 0t0 TCP *:http (LISTEN)
nginx 1508 www-data 7u IPv6 28283 0t0 TCP *:http (LISTEN)
انجین ایکسم فعاله ؟! من فعالش نکرده بودم که ! تو تاپیک قبلیم زده بودم
-
حل شد ممنونم