Closed Forezsty closed 8 months ago
hi this time I am doing the installation on my debian 12 server, I am trying to enter without putting the extension "c2-server" as you said. in the first image I made database.sql compatible with mariadb "utf8mb4_0900_ai_ci to utf8mb4_unicode_ci"
apt-get install php-mysql
apt install libapache2-mod-php
a2enmod rewrite
cd /var/www/html/c2-server && composer install && .env configured
cd /var/www/html/web\ socket/ && composer install && .env configured
Modify /etc/apache2/apache2.conf
php Server/web\ socket/App.php
I executed the commands above. When I log in to the url, I get the apache page. image 1 In the 2nd image, I removed the index.html page, but this time I only see the directory indexes image 2 I have attached my apache.conf file to the topic. What am I doing wrong, what is missing? Is there any other information you want me to send you? apache2.conf.txt
Try commenting this part
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
#<Directory /var/www/>
# Options Indexes FollowSymLinks
# AllowOverride None
#Require all granted
#</Directory>
<Directory /var/www/html/c2-server>
Options -Indexes
DirectoryIndex app.php
AllowOverride All
Require all granted
</Directory>
im going to my url http://+++.105.5.163/
Forbidden
You don't have permission to access this resource.
Apache/2.4.57 (Debian) Server at 194.105.5.163 Port 80
ERROR LOG
[Fri Mar 01 22:13:52.700985 2024] [authz_core:error] [pid 11494] [client 212.8.250.240:10624] AH01630: client denied by server configuration: /var/www/html/
Permissions for "c2-server"
rwxr-xr-x
Octal mode 755
root@debian12:~# apachectl configtest
Syntax OK
Which user owns the files in /var/www? Trying changing it to www-data
chown -R www-data:www-data /var/www
root@debian12:/var/www/html# ls -l /var/www/html/c2-server
total 32
-rw-r--r-- 1 root root 1713 Mar 1 20:18 app.php
-rw-r--r-- 1 root root 217 Mar 1 20:18 composer.json
-rw-r--r-- 1 root root 11620 Mar 1 20:18 composer.lock
-rw-r--r-- 1 root root 420 Mar 1 20:18 routes.php
drwxr-xr-x 6 root root 4096 Mar 1 20:18 src
drwxr-xr-x 6 root root 4096 Mar 1 20:20 vendor
root@debian12:/var/www/html# chown -R www-data:www-data /var/www/html/c2-server root@debian12:/var/www/html# ls -l /var/www/html/c2-server
total 32
-rw-r--r-- 1 www-data www-data 1713 Mar 1 20:18 app.php
-rw-r--r-- 1 www-data www-data 217 Mar 1 20:18 composer.json
-rw-r--r-- 1 www-data www-data 11620 Mar 1 20:18 composer.lock
-rw-r--r-- 1 www-data www-data 420 Mar 1 20:18 routes.php
drwxr-xr-x 6 www-data www-data 4096 Mar 1 20:18 src
drwxr-xr-x 6 www-data www-data 4096 Mar 1 20:20 vendor
root@debian12:/var/www/html# sudo service apache2 restart
[Fri Mar 01 22:53:05.214982 2024] [authz_core:error] [pid 11827] [client 212.8.250.240:24331] AH01630: client denied by server configuration: /var/www/html/
403 Forbidden
You don't have permission to access this resource.
buddy if you want I can give you the server information so you can figure out faster what the problem is. I got the same errors on my ubuntu server. Telegram: https://t.me/sempronx
It's me
Hello, I tried to perform the installation as follows, but I was not successful. Ubuntu 22.04.3 LTS sudo apt install apache2 sudo git clone https://github.com/Tomiwa-Ot/moukthar.git sudo mv moukthar/Server/* /var/www/html/ cd /var/www/html/c2-server sudo apt install composer composer install sudo nano .env
cd /var/www/html/web\ socket/ composer install sudo nano .env
sudo apt-get install mysql-server sudo mysql -u root -p CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'b!mbo4431312deCDAWAxlex'; GRANT ALL PRIVILEGES ON . TO 'myuser'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; EXIT; sudo mysql -u myuser -p create database cc; exit cd .. sudo mysql -u myuser -p cc < /var/www/html/database.sql sudo systemctl start apache2 sudo systemctl start mysql sudo systemctl status apache2
sudo systemctl status mysql
php web\ socket/App.php
sudo apt-get install php-mysql php web\ socket/App.php
Maybe its work. sudo nano /etc/apache2/apache2.conf
sudo service apache2 restart Now i go to my panel but have this error
tail -f /var/log/apache2/error.log
sudo a2enmod rewrite sudo systemctl restart apache2 Now error gone but when i enter the panel i only face php codes sudo apt install libapache2-mod-php sudo systemctl restart apache2 Now there is a php page but its sources are not loaded
cd c2-server/src/View nano header.php && nano footer.php
Now i have only this errors
php web\ socket/App.php
Now I opened the browser and went to my panel http://172.24.253.12/c2-server/. I am directly on the header.php page without login.php. Why am I not on the login screen and why only header.php appears. When I examined the point where I am, I realized that the header.php and footer.php page works, but the home.php page cannot work within this page. Look also when I press the "logout" button it throws me to http://172.24.253.12/logout
the same thing happens with the "reset password" button. there seems to be a lot of errors, is there something I'm missing? maybe I didn't install some dependencies? or do we have to edit the code ourselves? sudo cat /var/log/apache2/error.log when I run this code I don't see any current errors. Can you make a video of how it was installed?