I placed my website in the directory /home/admin/web/l2jserver.freemyip.com/public_html
index.php is located in the /public subdirectory
/home/admin/web/l2jserver.freemyip.com/public_html/public
in the instructions for using this site there is a paragraph that says that I need to make changes to sudo nano /etc/nginx/sites-available/your_domain
add these lines
location / {
try_files $uri $uri/ /index.php?$args;
}
but here it is on a different path
I made changes to
/home/admin/conf/web
*.nginx.conf
*.nginx.ssl.conf
Code: Select all
server {
listen myip:80;
server_name l2jserver.freemyip.com www.l2jserver.freemyip.com;
error_log /var/log/apache2/domains/l2jserver.freemyip.com.error.log error;
location / {
proxy_pass http://myip:8080;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|ttf|otf|webp|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav>
root /home/admin/web/l2jserver.freemyip.com/public_html/public;
access_log /var/log/apache2/domains/l2jserver.freemyip.com.log combined;
access_log /var/log/apache2/domains/l2jserver.freemyip.com.bytes bytes;
expires max;
# try_files $uri @fallback;
try_files $uri $uri/ /index.php?$args;
}
}
location /error/ {
alias /home/admin/web/l2jserver.freemyip.com/document_errors/;
}
location @fallback {
proxy_pass http://myip:8080;
}
location ~ /\.ht {return 404;}
location ~ /\.env {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
disable_symlinks if_not_owner from=/home/admin/web/l2jserver.freemyip.com/public_html/public;
include /home/admin/conf/web/nginx.l2jserver.freemyip.com.conf*;
}
*.apache2.conf
*.apache2.ssl.conf
Code: Select all
<VirtualHost myip:8080>
ServerName l2jserver.freemyip.com
ServerAlias www.l2jserver.freemyip.com
ServerAdmin [email protected]
DocumentRoot /home/admin/web/l2jserver.freemyip.com/public_html/public
ScriptAlias /cgi-bin/ /home/admin/web/l2jserver.freemyip.com/cgi-bin/
Alias /vstats/ /home/admin/web/l2jserver.freemyip.com/stats/
Alias /error/ /home/admin/web/l2jserver.freemyip.com/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/l2jserver.freemyip.com.bytes bytes
CustomLog /var/log/apache2/domains/l2jserver.freemyip.com.log combined
ErrorLog /var/log/apache2/domains/l2jserver.freemyip.com.error.log
<Directory /home/admin/web/l2jserver.freemyip.com/stats>
AllowOverride All
</Directory>
<Directory /home/admin/web/l2jserver.freemyip.com/public_html/public
AllowOverride All
Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php8.2-fpm-l2jserver.freemyip.com.sock|fcgi://localhost/"
</FilesMatch>
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
IncludeOptional /home/admin/conf/web/apache2.l2jserver.freemyip.com.conf*
</VirtualHost>
With these settings the site does not open
please help me solve this problem