When i try to get into my localhost folder I get this
I tried to uninstall and reinstall apache2 but nothing changed
i restarted apache2 and reloaded it nothing
i can access php myadmin and also mysql
however localhost stays 'empty' but i have folders in var/www/html
http://local.server.ip gives me this error
bash: http://local.server.ip: No such file or directory
[Fri Nov 22 00:07:53.655847 2019] [mpm_prefork:notice] [pid 21559] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Nov 22 00:07:53.655912 2019] [core:notice] [pid 21559] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 22 01:15:05.406145 2019] [mpm_prefork:notice] [pid 21559] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Nov 22 01:15:05.436629 2019] [mpm_prefork:notice] [pid 21559] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Nov 22 01:15:05.436640 2019] [core:notice] [pid 21559] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 22 01:16:52.092655 2019] [mpm_prefork:notice] [pid 21559] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Nov 22 01:16:52.129474 2019] [mpm_prefork:notice] [pid 21559] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Nov 22 01:16:52.129490 2019] [core:notice] [pid 21559] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 22 01:30:50.708402 2019] [mpm_prefork:notice] [pid 21559] AH00169: caught SIGTERM, shutting down
[Fri Nov 22 01:31:02.848171 2019] [mpm_prefork:notice] [pid 27340] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Nov 22 01:31:02.848207 2019] [core:notice] [pid 27340] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 22 01:31:20.409265 2019] [mpm_prefork:notice] [pid 27340] AH00169: caught SIGTERM, shutting down
[Fri Nov 22 01:34:21.641232 2019] [mpm_prefork:notice] [pid 28568] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Nov 22 01:34:21.641268 2019] [core:notice] [pid 28568] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 22 01:34:46.704722 2019] [mpm_prefork:notice] [pid 28568] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Nov 22 01:34:46.725762 2019] [mpm_prefork:notice] [pid 28568] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Nov 22 01:34:46.725772 2019] [core:notice] [pid 28568] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 22 02:08:30.892405 2019] [mpm_prefork:notice] [pid 28568] AH00169: caught SIGTERM, shutting down
[Fri Nov 22 02:08:30.984621 2019] [mpm_prefork:notice] [pid 30975] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Nov 22 02:08:30.984671 2019] [core:notice] [pid 30975] AH00094: Command line: '/usr/sbin/apache2'
grep -inRH "ServerName " /etc/apache2/ | grep "\s#"*
I added
ServerName = Localhost
and
grep -inRH "ServerName " /etc/apache2/ | grep "\s#"*
gives me this output
i used a virtuell host before
You need to put a file, not just folders in /var/www/html. Make sure the file is readable by the Apache process too. Try putting a file named index.html there, run chmod a+r /var/www/html/index.html and then browse to localhost again - you should see the contents of your file then
Related
I recently got myself a Fedora VM to do coding with and I cannot get Apache to log errors
My httpd.conf is still pretty default and so is my PHP.
sudo tail -f /var/log/httpd/error_log output:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::ef21:ea50:d362:afe9%ens33. Set the 'ServerName' directive globally to suppress this message
[Tue Aug 30 18:06:08.311018 2022] [lbmethod_heartbeat:notice] [pid 5172:tid 5172] AH02282: No slotmem from mod_heartmonitor
[Tue Aug 30 18:06:08.316093 2022] [mpm_event:notice] [pid 5172:tid 5172] AH00489: Apache/2.4.54 (Fedora Linux) configured -- resuming normal operations
[Tue Aug 30 18:06:08.316107 2022] [core:notice] [pid 5172:tid 5172] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Tue Aug 30 18:14:21.328254 2022] [mpm_event:notice] [pid 5172:tid 5172] AH00492: caught SIGWINCH, shutting down gracefully
[Tue Aug 30 18:14:22.415182 2022] [suexec:notice] [pid 5669:tid 5669] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::ef21:ea50:d362:afe9%ens33. Set the 'ServerName' directive globally to suppress this message
[Tue Aug 30 18:14:22.422270 2022] [lbmethod_heartbeat:notice] [pid 5669:tid 5669] AH02282: No slotmem from mod_heartmonitor
[Tue Aug 30 18:14:22.425068 2022] [mpm_event:notice] [pid 5669:tid 5669] AH00489: Apache/2.4.54 (Fedora Linux) configured -- resuming normal operations
[Tue Aug 30 18:14:22.425082 2022] [core:notice] [pid 5669:tid 5669] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
I already set Apache LogLevel to info and in php.ini I set it to log errors and not output them and also enabled HTML errors
Please let me know if you need anything else.
I'm trying to Configure timezone for PHP and after setting that, I have a set of commands to execute provided,
cd /etc/apache2/mods-enabled/
ln -s ../mods-available/rewrite.load .
ln -s ../mods-available/headers.load .
ln -s ../mods-available/expires.load .
ln -s ../mods-available/ssl.load .
ln -s ../mods-available/ssl.conf .
ln -s ../mods-available/php5* .
ln -s ../mods-available/socache_shmcb.load .
/etc/init.d/apache2 restart
When I run the last command with sudo, I get the following error,
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!
When I type in the terminal,
systemctl status apache2.service
I get the output of,
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Drop-In: /lib/systemd/system/apache2.service.d
└─forking.conf
Active: failed (Result: exit-code) since Fri 2017-12-08 12:57:08 CET; 5min ago
Process: 23298 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 23587 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
What should I do in this case?
Upadte
The output of the command of sudo cat /var/log/apache2/error.log is provided,
[Fri Dec 08 11:58:17.392972 2017] [mpm_event:notice] [pid 12892:tid 140108409681792] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Fri Dec 08 11:58:17.393055 2017] [core:notice] [pid 12892:tid 140108409681792] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 08 11:58:36.585248 2017] [mpm_event:notice] [pid 12892:tid 140108409681792] AH00493: SIGUSR1 received. Doing graceful restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Dec 08 11:58:36.588582 2017] [mpm_event:notice] [pid 12892:tid 140108409681792] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Fri Dec 08 11:58:36.588590 2017] [core:notice] [pid 12892:tid 140108409681792] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 08 11:58:39.747035 2017] [mpm_event:notice] [pid 12892:tid 140108409681792] AH00491: caught SIGTERM, shutting down
[Fri Dec 08 11:58:40.816350 2017] [mpm_prefork:notice] [pid 15087] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Fri Dec 08 11:58:40.816435 2017] [core:notice] [pid 15087] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 08 11:58:42.228275 2017] [mpm_prefork:notice] [pid 15087] AH00169: caught SIGTERM, shutting down
[Fri Dec 08 11:58:43.344556 2017] [mpm_prefork:notice] [pid 15186] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Fri Dec 08 11:58:43.344605 2017] [core:notice] [pid 15186] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 08 12:40:45.121960 2017] [mpm_prefork:notice] [pid 15186] AH00169: caught SIGTERM, shutting down
The output of command /usr/sbin/apache2 is provided,
[Fri Dec 08 13:30:36.877713 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Fri Dec 08 13:30:36.879775 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Fri Dec 08 13:30:36.879827 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Fri Dec 08 13:30:36.879865 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Fri Dec 08 13:30:36.879905 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php5.load: No such file or directory
You haven't properly enabled the PHP 5 module by the looks of it. Try running a2enmod php5, if it fails you might not have the module installed, in which case try: apt-get install libapache2-mod-php5 and then a2enmod php5 again.
I have a php websocket server running but I want to connect to it via https. This is my JS: var conn = new WebSocket('wss://81.169.228.159:3671/wss2');
And this is my apache config:
ProxyPass /wss2/ ws://domain:3671/
I have proxy and proxy_wstunnel enabled.
So, what am I doing wrong?
ERROR LOG:
[Mon Mar 13 04:38:04.228450 2017] [mpm_prefork:notice] [pid 6683] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 04:38:04.228471 2017] [core:notice] [pid 6683] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 12:42:39.475641 2017] [:error] [pid 12432] [client 195.169.9.201:8546] script '/var/www/html/luukwuijster.io/phpinfo.php' not found or unable to stat
[Mon Mar 13 12:56:25.370986 2017] [mpm_prefork:notice] [pid 6683] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 12:56:26.539948 2017] [mpm_prefork:notice] [pid 26932] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 12:56:26.539972 2017] [core:notice] [pid 26932] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:06:36.280229 2017] [mpm_prefork:notice] [pid 26932] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:06:37.473220 2017] [mpm_prefork:notice] [pid 27256] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:06:37.473248 2017] [core:notice] [pid 27256] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:19:52.144983 2017] [mpm_prefork:notice] [pid 27256] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:19:53.235045 2017] [mpm_prefork:notice] [pid 27775] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:19:53.235083 2017] [core:notice] [pid 27775] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:22:21.467607 2017] [mpm_prefork:notice] [pid 27775] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:22:22.618416 2017] [mpm_prefork:notice] [pid 27911] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:22:22.618455 2017] [core:notice] [pid 27911] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:28:08.356148 2017] [mpm_prefork:notice] [pid 27911] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:28:09.546926 2017] [mpm_prefork:notice] [pid 28540] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:28:09.546964 2017] [core:notice] [pid 28540] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:35:26.856446 2017] [mpm_prefork:notice] [pid 28540] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:35:28.532498 2017] [mpm_prefork:notice] [pid 29153] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:35:28.532541 2017] [core:notice] [pid 29153] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:46:19.084561 2017] [ssl:error] [pid 29170] [client 208.93.152.93:54712] AH02042: rejecting client initiated renegotiation
[Mon Mar 13 13:57:14.410892 2017] [mpm_prefork:notice] [pid 29153] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:57:16.465381 2017] [mpm_prefork:notice] [pid 29927] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:57:16.465424 2017] [core:notice] [pid 29927] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 14:00:03.312882 2017] [:error] [pid 29936] [client 81.169.228.159:33706] PHP Notice: Undefined index: text in /var/www/html/luukwuijster.io/slack/cronofy/huiswerk.php on line 9
I assume that you have a React\Socket\Server listening on port 8080 (aka php push-server.php). The tutorial on the ratchet website should get you up to this point.
I also assume that you have already configured and loaded the proxy and proxy_wstunnel apache modules as mentioned in the question.
Below is the config I personally use to achieve a WebSocket connection.
I use /ws/ instead of the /wss2/ mentioned in the tutorial for a better looking URL. Feel free to adjust the config as necessary.
Apache Config
#SSL (Secure)
<VirtualHost *:443>
DocumentRoot /FILE_PATH_TO_WEBROOT
ServerName local.sitename.com
ServerAlias local.sitename.com
<Directory /FILE_PATH_TO_WEBROOT>
Options FollowSymLinks
AllowOverride all
php_flag display_errors On
Require all granted
</Directory>
SSLCertificateFile /etc/httpd/ssl/.crt
SSLCertificateKeyFile /etc/httpd/ssl/.key
ProxyRequests Off
ProxyPass "/ws/" "ws://local.sitename.com:8080/"
</VirtualHost>
#NON-SSL (Insecure)
<VirtualHost *:80>
DocumentRoot /FILE_PATH_TO_WEBROOT
ServerName local.sitename.com
ServerAlias local.sitename.com
<Directory /FILE_PATH_TO_WEBROOT>
Options FollowSymLinks
AllowOverride all
php_flag display_errors On
Require all granted
</Directory>
ProxyRequests Off
ProxyPass "/ws/" "ws://local.sitename.com:8080/"
</VirtualHost>
Secure JavaScript Socket Connection
var conn = new WebSocket('wss://local.sitename.com/ws/');
Insecure JavaScript Socket Connection
var conn = new WebSocket('ws://local.sitename.com/ws/');
I'm using OpenSuse as OS and I want to setup wordpress,
When i go to the URL: localhost/wp-admin/install.php to install it, it shows me a blank web page.
a tail -f /var/log/apache2/error_log shows me the following:
[Thu Mar 09 09:42:19.791559 2017] [ssl:warn] [pid 1453] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Mar 09 09:42:19.905721 2017] [mpm_prefork:notice] [pid 1453] AH00163: Apache/2.4.10 (Linux/SUSE) OpenSSL/1.0.1i-fips PHP/5.6.30 configured -- resuming normal operations
[Thu Mar 09 09:42:19.905770 2017] [core:notice] [pid 1453] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -D FOREGROUND'
[Thu Mar 09 19:52:23.863004 2017] [ssl:warn] [pid 1318] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 1.0.1k 8 Jan 2015, version currently loaded is OpenSSL 1.0.1i-fips 6 Aug 2014) - may result in undefined or erroneous behavior AH00557: httpd2-prefork: apr_sockaddr_info_get() failed for linux-kny7 AH00558: httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Thu Mar 09 19:52:33.915213 2017] [ssl:warn] [pid 1318] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 1.0.1k 8 Jan 2015, version currently loaded is OpenSSL 1.0.1i-fips 6 Aug 2014) - may result in undefined or erroneous behavior
[Thu Mar 09 19:52:33.915299 2017] [ssl:warn] [pid 1318] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Mar 09 19:52:35.175637 2017] [mpm_prefork:notice] [pid 1318] AH00163: Apache/2.4.10 (Linux/SUSE) OpenSSL/1.0.1i-fips PHP/5.6.30 configured -- resuming normal operations [Thu Mar 09 19:52:35.175813 2017] [core:notice] [pid 1318] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D
I need help please.
I recently updated my xampp installation to current version with php7, however every thing seem to work fine until i tried testing out a laravel 5.2 project.
Accessing a page that doesn't make a database connection has no issue, but trying accessing a route that makes a db query i get the error "ERR_CONNECTION_RESET".
The error log doesn't really show any concrete errors that cause this.
[Fri Apr 22 20:50:41.365814 2016] [ssl:warn] [pid 2856:tid 436] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 22 20:50:41.422857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.5 configured -- resuming normal operations
[Fri Apr 22 20:50:41.422857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Fri Apr 22 20:50:41.422857 2016] [core:notice] [pid 2856:tid 436] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Apr 22 20:50:41.427857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00418: Parent: Created child process 7024
I have gone through php.ini configuration several times. What could cause this problem?