How to resolve 'Failed to connect to bus: No such file or directory' in openSUSE

How to resolve ‘Failed to connect to bus: No such file or directory’
when I would like to start apache 2
I see these error messages:


**systemctl enable apache2**


**systemctl start apache2.service**
Failed to connect to bus: No such file or directory
**systemctl start apache2**
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory


**zypper install httpd**
Loading repository data...
Reading installed packages...
'httpd' not found in package names. Trying capabilities.
'apache2' providing 'httpd' is already installed.
'nginx' providing 'httpd' is already installed.
Resolving package dependencies...
Nothing to do.


**cd nano /etc/apache2/
.....**
-rw-r--r-- 1 root root  4086 Apr 11 20:48 default-server.conf
-rw-r--r-- 1 root root  2924 Jan 29 14:36 errors.conf
-rw-r--r-- 1 root root   128 Jan 29 14:36 global.conf
-rw-r--r-- 1 root root  9033 Jan 29 14:36 httpd.conf
-rw-r--r-- 1 root root  1055 Apr 11 20:32 listen.conf
-rw-r--r-- 1 root root  1957 Jan 29 14:36 loadmodule.conf

.
.
.

In my browser when I want to try to connect to web server:

127.0.0.1:defined Port number within listen.conf

I cannot connect to my web server

Any suggestions?

Yes,
Suggestion 1: stop just trying commands, you might invoke something you don’t want.
Suggestion 2: Use YaST to

  • Install the LAMP server pattern, it will also install the YaST HTTP server module. After this step, exit YaST en start it again, the new module will be in Networkservices
  • Configure and start the apache2 webserver

Another thing: always include the prompt when posting a command, it shows us whether a normal user or root is executing it.

Hi,
my activity is with root user every time

every necessary package was installed like phpmyadmin, apache2, php, and mysql
please see my pictures taken:
https://ibb.co/jsFyCS
https://ibb.co/jsFyCS
https://ibb.co/nhLbz7
https://ibb.co/iDbGz7
https://ibb.co/jsFyCS

**apache2ctl start**
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/default-server.conf:9
AH00526: Syntax error on line 1 of /etc/apache2/conf.d/wsl.conf:
AcceptFilter cannot occur within <VirtualHost> section

and


nano /etc/apache2/default-server.conf

DocumentRoot /srv/www/htdocs
ServerName localhost
ServerAdmin redscience.official@gmail.com
<Directory /srv/www/htdocs>
 AllowOverride None
 Require all granted
</Directory>
UserDir public_html
NameVirtualHost 127.0.0.1

and


nano /etc/apache2/conf.d/wsl.conf
AcceptFilter http none

Why don’t you use YaST, like I suggested, You can even use it on a server without desktop:


su -c yast

BTW: where’s that wsl.conf coming from? I don’t have it on my systems.

EDIT: Sorry, missed the pictures. What you can do is remove the /etc/apache2/* , then reinstall apache2 to start with a clean config,

WSL is Windows 10 subsystem for Linux
I used rm -rf /etc/apache2/* and zypper remove apache2 and again I reinstalled apache2 with zypper install apache*
by the way, I cannot use http server with yast panel or service apache2 start or systemctl start apache2
if you need any log data or file data, don’t be hesitate to say me What do you need to resolve this problem
thanks ahead

I re-attached images here to show you:
https://imgur.com/610pzEl
https://imgur.com/a/LvncC
https://imgur.com/a/nCW3N
https://imgur.com/a/BSOK4

Knurpht, do you have any idea?

No, no idea at all. Have been without Windows since ~2001 and have no desire to run some crippled linux implementation such as WSL.

I don’t know how to solve the original problem but WSL is actually really nice :slight_smile: recommend to try it out.

I don’t have any problem in Debian base within WSL like Ubuntu or Debian
I think this problem can resolve very easy if openSUSE team work on it

openSUSE is one of the most easiest projects to contribute to, we’re a 100% volunteer community, there is no such thing as ‘openSUSE team’.
What I still don’t get, is why you cannot use YaST to setup the webserver. Once you’re already root, and have installed the lamp-server pattern, YaST’s http module should be available. I’ve done literally dozens of webserver setups this way, and it has never failed once.