• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Domains work after migration but HTTP Request and Response Heade pulling default page

Hi Konstantin_Sigul,

could you please tell us WHICH error you got? And what the results of "1." and "2." was?

Could you please tell us as well WHICH, additional NGINX - directives you would like to add, and could you please respond with the error - message?

Please have as well a look in your error - logs for your domain ( and maybe as well the corresponding configuration files for nginx ) , because it helps to investigate issues, if we know these error - messages, instead of guessing, what might have happened.

 
Thanx a lot!

Sooo, when in terminal i enter this command

Code:
locate php-fpm.sock

i get

Code:
[root@9122 ~]# locate php-fpm.sock
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

I tried to open nginx logs
but i get this error

Code:
[root@9122 ~]# /var/log/nginx/error.log
-bash: /var/log/nginx/error.log: Permission denied

Then i tried to change user to webmaster

Code:
chown -R webmaster /var/log/nginx/

but its still doesn't work.

Then i pasted following code into nginx additional directives:

Code:
     location = /favicon.ico {
                log_not_found off;
                access_log off;
        }
        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }
        location / {
                try_files $uri $uri/ /index.php?$args;
        }
        location ~ \.php$ {
                fastcgi_pass unix:[B][COLOR="#FF0000"]/var/run/php5-fpm.sock[/COLOR][/B];
                fastcgi_index index.php;
                try_files $uri $uri/ /index.php?q=$uri&$args;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                include /etc/nginx/fastcgi_params;
                include /etc/nginx/fastcgi.conf;
        }
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }

After entering this code i get this error:

Code:
nginx: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/djkrypton.de/conf/vhost_nginx.conf:20 nginx: configuration file /etc/nginx/nginx.conf test failed

Sorry if i dont understand some basic stuff, but im not an expert.
One of the reasons of my migration was that i now got Plesk Admin Panel, so i don't have to mess with the terminal)
 
Hi Konstantin_Sigul,

sorry to say that, but due to the case, that you are absolute inexperienced in linux and it's commands, please consider opening a support - ticket ( Parallels - Support ) - they will solve your issues and will inform you about what they did to resolve the issue(s).



Unfortunately, you need more linux knowledge, when trying to solve issues, as described, because investigations have to be done, which you not only should do, because of suggestions, but as well, because you understand the need and usage. If you are just trying to follow suggestions, without the needed linux knowledge, then we actually "do" all the server administation work for you, because we have to guide you step-by-step to the whole procedures of investigations and possible solutions/work-arounds. The usage of Plesk can "normally" be done without any linux knowledge, but as you can see, in cases of issues/problems, you need someone, who does have some linux knowledge, to solve the issues, which are a result of missing nginx directives and the wrong configurations and modifications.


Even that I wrote the whole above, I still will mention some things to your posts ( hoping that you will see the need to either hire a server administrator, or using the paid support, to solve your very own issues/problems, which are absolutely not a cause of the usage of Plesk, or it's coding ):

...
Code:
[root@9122 ~]# locate php-fpm.sock
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

You can't use the "locate" command, without building ( and for the future usage as well "updating" ) the depending database "mlodate.db". This is done with the command "updatedb" as user "root" over the command line. You will get your first results with the locate command, when you created the database. Please update the database on a regular basis, to keep it up-to-date.

...
Code:
[root@9122 ~]# /var/log/nginx/error.log
-bash: /var/log/nginx/error.log: Permission denied

You can't open log - files, just by typing the location definition into your console - you need an additional program, as for exemple "tail", to view the files. ( Please read a documentation, as for example: http://linux.about.com/library/cmd/blcmdl1_tail.htm ). "Tail" will read the files and as a result will post them to your command line. A correct usage would be:

tail /var/log/nginx/error.log

... but, as additional informations, these are just the errors for the nginx webserver itself, which do not include errors from your specific domain. These errors are logged at: "/var/www/vhosts/<domain>/logs/proxy_access*_log" ( You have to replace "<domain>" with YOUR domain and the nginx error - logs are located inside the "proxy_error_log" at the mentioned location ) Please see again:

... for the complete documentation for paths of log - and configuration files.​


...
Code:
chown -R webmaster /var/log/nginx/

Sorry, but this was absolute nonsens. The "chown" - command should only be used, when you know what you are doing.
In your case, you gave the rights to the user "webmaster", to write and read the whole folder and its content of "/var/log/nginx/" - but as we can see from your posting, you were logged in with the user "root". Your command is as well a NO-GO, because now the system-user "nginx" isn't able to write to his own webserver log - files - this will result in failures/issues/problems for your nginx webserver.
To repair your nonsense, please read carefully the whole KB - article and its mentioned forum - links!!!



Finally, you were trying to add additional nginx directives, which are already defined in some location definitions of your domain - specific nginx - configuration. Luckily, Plesk and its nginx-configuration-checker checks for misconfigurations and denies the usage of double entries. Please inform yourself about nginx configurations and please have as well a look at the domain - specific configuration files to learn, WHICH configurations are already set and should never been modified to prevent failures.

You use wordpress and the plugin W3 Total Cache ( and other plugins as well ) - when you use nginx, you definetly need additional nginx directives and additional server configurations to make this work, but please, please, please, don't just take examples from the internet ( which never can suit your domain - specific setting ) and inform yourself about the correct usage. A linux administrator, or as well the Parallels - Support, might help and inform you about the correct usage for your very own, unique wordpress installation.
 
Last edited by a moderator:
Thanx alot for your sugesstions and your time! I appreciate that!

I will definitely write about my case to Plesk support team.
And of course once in a while i need some help, but i think it was only 2 or 3 cases since 2009 when i moved to VPS.
If Plesk support won't help, i think i will post this problem on elance or other freelance site)

Its not that urgent and my site is not big - only 400-500 visits per day, but im abit upset with the fact that my visitors cant share my stuff on social networks)


I used chown command to change user on this vps, cuase i wasnt able to upload anything through FTP protocol. So i changed some folders ownership from webmaster to Apache. Thans why i thought that it also will help in this case)
 
Back
Top